Developer Guide and Reference

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

debug (Linux*)

Enables or disables generation of debugging information.

Syntax

Linux:

-debug[=keyword]

Windows:

None

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. It is the same as specifying -debug with no keyword.

minimal

Generates line number information for debugging.

[no]emit-column

Determines whether the compiler generates column number information for debugging.

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

Default

-debug none

No debugging information is generated.

Description

This option enables or disables generation of debugging information.

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).

Keywords semantic-stepping, inline-debug-info, variable-locations, and extended can be used in combination with each other. 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.

-debug full or -debug all

Generates complete debugging information. It is the same as specifying -debug with no keyword.

-debug minimal

Generates line number information for debugging.

-debug emit-column

Generates column number information for debugging.

On Linux* systems, debuggers read debug information from executable images. As a result, information is written to object files and then added to the executable by the linker.

IDE Equivalent

None

Alternate Options

For -debug full, -debug all, or -debug

Linux: -g

Windows: /debug:full, /debug:all, or /debug

See Also