Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

debug (Windows*)

Enables or disables generation of debugging information.

Syntax

Linux:

None

Windows:

/debug[:keyword]

/nodebug

Arguments

keyword

Is the type of debugging information to be generated. Possible values are:

none

Disables generation of debugging information.

full or all

Generates complete debugging information.

minimal

Generates line number information for debugging.

For information on the non-default settings for these keywords, see the Description section.

Default

/debug:none

This is the default on the command line and for a release configuration in the IDE.

/debug:all

This is the default for a debug configuration in the IDE.

Description

This option enables or disables generation of debugging information. It is passed to the linker.

By default, enabling debugging, will disable optimization. To enable both debugging and optimization use the /debug option together with one of the optimization level options (/O3, /O2 or /O3).

If conflicting keywords are used in combination, the last one specified on the command line has precedence.

Option

Description

/debug:none

Disables generation of debugging information. It is the same as specifying /nodebug.

/debug:full or /debug:all

Generates complete debugging information. It produces symbol table information needed for full symbolic debugging of unoptimized code and global symbol information needed for linking. It is the same as specifying /debug with no keyword. 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:minimal

Generates line number information for debugging.

IDE Equivalent

Visual Studio: General > Debug Information Format (/debug:minimal, /debug:full)

Alternate Options

For /debug:all or
/debug

Linux: None
Windows: /Zi

See Also