RAD Studio (Common)
ContentsIndex
PreviousUpNext
Debug information (Delphi)
Type  
Switch  
Syntax  
{$D+} or {$D-} {$DEBUGINFO ON} or {$DEBUGINFO OFF}  
Default  
{$D+} {$DEBUGINFO ON}  
Scope  
Global  

Remarks 

The $D directive enables or disables the generation of debug information. This information consists of a line-number table for each procedure, which maps object-code addresses into source text line numbers. 

For units, the debug information is recorded in the unit file along with the unit's object code. Debug information increases the size of unit file and takes up additional memory when compiling programs that use the unit, but it does not affect the size or speed of the executable program. 

When a program or unit is compiled in the {$D+} state, the integrated debugger lets you single-step and set breakpoints in that module. 

The Include debug info (Project|Options|Linker) and Map file (Project|Options|Linker) options produce complete line information for a given module only if you've compiled that module in the {$D+} state. 

The $D switch is usually used in conjunction with the $L switch, which enables and disables the generation of local symbol information for debugging.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!