Name
$DebugInfo Compiler Directive
Syntax
{$D+} // default
{$DebugInfo On} // default
{$D-}
{$DebugInfo Off}Scope
File
Description
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.
See Also
| $DefinitionInfo Compiler Directive, $LocalSymbols Compiler Directive, $ReferenceInfo Compiler Directive |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access