$DebugInfo Compiler Directive
When
$DebugInfo
is enabled, the compiler generates
line number information to help you debug the unit. Without the line
number information, the only way you can debug the unit is from the
CPU view.
To take maximum advantage of the debugger, you should also use the
$LocalSymbols
directive to store information about
the types, variables, and subroutines in the unit.
The debug information is stored in
the unit’s .dcu file and does not affect
performance or the size of the final .exe or
.dll file. The most common reason to disable
$DebugInfo
is when you are releasing
.dcu files without the source code. In very
large projects, you might save a little bit of time and disk space by
disabling $DebugInfo
, but in most cases, the
savings are minuscule.