/Z7, /Zi, /ZI (Debug Information Format)
Select the type of debugging information created for your program and whether this information is kept in object (.obj) files or in a program database (PDB).
The options are described in the following table.
The compiler names the program database project.pdb. If you compile a file without a project, the compiler creates a database named VCx0.pdb., where x is the major version of Visual C++ in use. The compiler embeds the name of the PDB in each .obj file created using this option, pointing the debugger to the location of symbolic and line-number information. When you use this option, your .obj files will be smaller, because debugging information is stored in the .pdb file rather than in .obj files.
If you create a library from objects that were compiled using this option, the associated .pdb file must be available when the library is linked to a program. Thus, if you distribute the library, you must distribute the PDB.
To create a library that contains debugging information without using .pdb files, you must select the compiler's C 7.0-Compatible (/Z7) option. If you use the precompiled headers options, debugging information for both the precompiled header and the rest of the source code is placed in the PDB. The /Yd option is ignored when the Program Database option is specified.
To set this compiler option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
Click the C/C++ folder.
Click the General property page.
Modify the Debug Information Format property.