debug (Windows*)

Specifies the type of debugging information generated by the compiler in the object file.

IDE Equivalent

Windows: General > Debug Information Format (/Z7, /Zd, /Zi)
Linux: None

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: See debug (Linux*).
Windows:  /debug[:keyword]
/nodebug

Arguments

keyword     Is the type of debugging information to be generated. Possible values are:
  none Generates no symbol table information.
  minimal Generates line numbers and minimal debugging information.
  partial Generates global symbol table information needed for linking.
  full Generates full debugging information.
  [no]semantic_stepping Determines whether enhanced debug information useful for breakpoints and stepping is produced.
  extended Enables semantic_stepping.

Default

/debug:minimal This is the default on the command line and for a release configuration in the IDE.
/debug:full This is the default for a debug configuration in the IDE.

Description

This option specifies the type of debugging information generated by the compiler in the object file.

Possible types of debugging information include:

Option

Description

/debug:none Produces no symbol table information; it is the same as specifying /nodebug. This /debug option produces the smallest size object module and passes /debug:none to the linker.
/debug:minimal Produces only line numbers and minimal debugging information. It produces global symbol information needed for linking, but not local symbol table information needed for debugging. The object module size is somewhat larger than if you specified /debug:none, but is smaller than if you specified /debug:full. This option passes /debug:minimal to the linker.
/debug:partial Produces global symbol table information needed for linking, but not local symbol table information needed for debugging. The object module size is somewhat larger than if you specified /debug:none, but is smaller than if you specified /debug:full. This option passes /debug:partial to the linker. Note: This option is not available in the IDE.
/debug:full or /debug Produces full debugging information. It produces symbol table information needed for full symbolic debugging of unoptimized code and global symbol information needed for linking. It produces the largest size object module. This option passes /debug:full to the linker. If you specify /debug:full for an application that makes calls to C library routines and you need to debug calls into the C library, you should also specify /dbglibs to request that the appropriate C debug library be linked against.

/debug:semantic_stepping

Produces enhanced debug information useful for breakpoints and stepping.
It tells the debugger to stop only at machine instructions that achieve the final effect of a source statement. For example, in the case of an assignment statement, this might be a store instruction that assigns a value to a program variable; for a function call, it might be the machine instruction that executes the call. Other instructions generated for those source statements are not displayed during stepping.

/debug:extended Enables the debug option semantic_stepping.

Alternate Options

/debug:minimal

Linux: None
Windows: /Zd (this is a deprecated option)

/debug:full or /debug

Linux: None
Windows: /Zi, /Z7

See Also

dbglibs compiler option