Share via


Changing Project Settings for a Debug Build

When you create a Visual C++ project, a Win32 Release and a Win32 Debug version of the project files are automatically made. You can change the project settings in the C/C++ tab of the Project Settings dialog (from the Settings command on the Project menu).

Option Result
Program Database (default) Produces a program database (.pdb) containing type information and symbolic debugging information.
Line Numbers Only Produces an .OBJ file or executable (.exe) file containing only global and external symbol and line-number information (no symbolic debugging information).
C7 Compatible Produces an .obj file and an .exe file containing line numbers and full symbolic debugging information for use with the debugger.
None Produces no debugging information.

For more information, see What Are .pdb and .dbg Files?.

To change the debug information generated during a build

  1. From the Project menu, click Settings.

    The Project Settings dialog box appears.

  2. Choose the C/C++ tab.

  3. Choose an option from the Debug info dropdown list.

  4. Click OK to set the option and close the Project Settings dialog box.

To change the format of the debug information generated during a build

  1. From the Project menu, click Settings.

    The Project Settings dialog box appears.

  2. Choose the Link tab.

  3. Choose Debug from the Category dropdown list.

  4. Select Microsoft Format (the default), COFF Format, or Both Formats.

  5. Click OK to accept the settings and close the Project Settings dialog box.

To generate a mapfile during a build

  1. From the Project menu, click Settings.

    The Project Settings dialog box appears.

  2. Choose the Link tab.

  3. Choose Debug from the Category dropdown list.

  4. Select the Generate mapfile checkbox.

  5. Enter a name in the Mapfile name text box or accept the default.

  6. Click OK to accept the settings option and close the Project Settings dialog box.

To redirect debug input/output

  1. From the Project menu, click Settings.

    The Project Settings dialog box appears.

  2. Select the Debug tab.

  3. In the Program Arguments text box, specify one or more I/O redirection commands from the following table. You can combine I/O redirection commands in any order.

  4. Click OK to accept the redirection and close the Project Settings dialog box.

Command Action
<file Reads stdin from file (see Note below)
>file Sends stdout to file (see Note below)
>>file Appends stdout to file (see Note below)
2>file Sends stderr to file (see Note below)
2>>file Appends stderr to file
2>&1 Sends stderr (2) output to same location as stdout (1)
1>&2 Sends stdout (1) output to same location as stderr (2)

Note   You can use the >, <, >>, and 2> commands for applications that read or write to stderr and stdout. In most (if not all) cases, this is specific to console applications.