Developer Guide and Reference

Contents

Zi, Z7
, ZI

Tells the compiler to generate full debugging information in either an object (.obj) file or a project database (PDB) file.

Syntax

Linux:
See option g.
macOS:
See option g.
Windows:
/Zi
/Z7
/ZI
Arguments
None
Default
OFF
No debugging information is produced.
Description
Option
/Z7
tells the compiler to generate symbolic debugging information in the object (.obj) file for use with the debugger. No .pdb file is produced by the compiler.
Option
/ZI
is a synonym for option
/Zi
.
The
/Zi
option tells the compiler to generate symbolic debugging information in a program database (PDB) file for use with the debugger. Type information is placed in the .pdb file, and not in the .obj file, resulting in smaller object files in comparison to option
/Z7
.
When option
/Zi
is specified, two PDB files are created:
  • The compiler creates the program database project.pdb. If you compile a file without a project, the compiler creates a database named vc
    x
    0.pdb, where
    x
    represents the major version of Visual C++, for example vc140.pdb.
    This file stores all debugging information for the individual object files and resides in the same directory as the project makefile. If you want to change this name, use option
    /Fd
    .
  • The linker creates the program database executablename.pdb.