Syntax:
The /debug, /Z7, /Zd, or /Zi options control the level of debugging information associated with the program being compiled.
In the visual development environment, specify the Debugging Level in the General or Debug Compiler Option Category. The options are:
/debug:none or /nodebug | /debug:minimal or /Zd |
/debug:partial | /debug:full, /debug, /Zi, or /Z7 |
The /debug options:
If you specify /debug:none or /nodebug, the compiler produces no symbol table information, which is needed for debugging or profiling. Only symbol information needed for linking (global symbols) is produced. The size of the resulting object module is the minimum size. If this option is specified, /debug:none is passed to the linker.
If you specify /debug:minimal or /Zd, the compiler produces minimal debug information, which allows global symbol table information needed for linking, but not local symbol table information needed for debugging. If /debug:minimal is specified, /debug:minimal and /debugtype:cv is passed to the linker.
If you omit the /[no]debug:keyword, /Z7, /Zd, and /Zi options, /debug:minimal is the default on the command line and for a release configuration in the visual development environment.
The /Zd option implies /nopdbfile and passes /debug:minimal /pdb:none /debugtype:cv to the linker.
The object module size is somewhat larger than if you specified /debug:none, but is smaller than if you specified /debug:full.
If you specify /debug:partial, the compiler produces debugging information to allow global symbol table information needed for linking, but not local symbol table information needed for debugging. If /debug:partial is specified, /debug:partial /debugtype:cv /pdb:none is passed to the linker.
The object module size is somewhat larger than if you specified /debug:none, but is smaller than if you specified /debug:full.
If you specify /debug:full, /debug, /Zi, or /Z7, the compiler produces symbol table information needed for full symbolic debugging of unoptimized code and global symbol information needed for linking. This is the default for a debug configuration in the visual development environment.
If you specify /debug:full for an application that make 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 (see Specifying Consistent Library Types).
The /Z7 option implies /nopdbfile and passes /debug:full /debugtype:cv /pdb:none to the linker.
The /debug:full, /debug, and /Zi options imply /pdbfile and pass /debug:full and /debugtype:cv to the linker.
If you specify /debug (with no keyword), the default optimization level changes to /optimize:0 (instead of /optimize:4) for the DF command.
To request program counter run-time correlation to source file line numbers (full traceback) for severe run-time errors, specify the /traceback option.