/DEBUG

Syntax:

/DEBUG

Creates debugging information for the executable file or DLL.

The linker puts the debugging information into a program database (PDB). It updates the program database during subsequent builds of the program. For details about PDBs, see /PDB.

An executable file or DLL created for debugging contains the name and path of the corresponding PDB. Visual Fortran 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 PDB, and embeds the path where it was created. To override this default, use /PDB:filename.

The object files must contain debugging information. Use the compiler's /Zi (Program Database), /Zd (Line Numbers Only), or /Z7 (C7 Compatible) option. If an object (whether specified explicitly or supplied from a library) was compiled with Program Database, its debugging information is stored in a PDB for the object file, and the name and location of the .PDB file is embedded in the object. The linker looks for the object's PDB first in the absolute path written in the object file and then in the directory that contains the object file. You cannot specify a PDB's filename or location to the linker.

If you have turned off Use Program Database (or specified /PDB:NONE on the command line), or if you have chosen either /DEBUGTYPE:COFF or /DEBUGTYPE:BOTH, the linker does not create a PDB but instead puts the debugging information into the executable file or DLL.

The /DEBUG option changes the default for the /OPT option from REF to NOREF.