NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

/DEBUG (Generate Debug Info)

/DEBUG

This option creates debugging information for the .exe file or DLL. When specifying this option, you automatically get a DEBUGTYPE of CV.

The linker puts the debugging information into a program database (PDB). It updates the PDB during subsequent builds of the program.

An .exe file or DLL created for debugging contains the name and path of the corresponding PDB. The debugger reads the embedded name and uses the PDB when you debug the program. The linker uses the base name of the program and the extension .pdb to name the program database, and embeds the path where it was created. To override this default, set the Use Program Database linker option (/PDB:filename on the command line) and specify a different file name in the Program database name text box.

The compiler’s Line Numbers Only (/Zd) or C7 Compatible (/Z7) option causes the compiler to leave the debugging information in the .obj files. You can also use the Program Database (/Zi) compiler option to store the debugging information in a PDB for the .obj file. The linker looks for the object’s PDB first in the absolute path written in the .obj file, and then in the directory that contains the .obj file. You cannot specify an object's PDB file name or location to the linker.

If the Use Program Database option is not selected, the linker does not create a PDB, but instead puts the debugging information into the .exe file or DLL.

The Generate Debug Info (/DEBUG) option changes the defaults for the /OPT option from REF to NOREF and from ICF to NOICF.

See Knowledge Base articles Q121366 for more information on .PDB and .DBG files.

See Also

Setting Linker Options | Linker Options | FAQ: Building Your Program