Export (0) Print
Expand All

Project Settings for a C or C++ Debug Configuration

You can change the project settings for a C or C++ debug configuration in the Property Pages dialog box, as discussed in Debug and Release Configurations. The following tables show where to find debugger-related settings in the Property Pages dialog box.

Note   Each debug property setting is automatically written and saved to the "per-user" file (.suo) for your solution whenever you save your solution.

Configuration Properties folder (Debugging category)

Setting Description
Command Specifies the command for launching the program you are debugging on the local machine. For remote debugging, use Remote Command and leave this blank.
Command Arguments Specifies arguments for the command specified above.

You can use the following redirection operators in this box:

<file
Reads stdin from file.
>file
Writes stdout to file.
>>file
Appends stdout to file.
2>file
Writes stderr to file.
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).

In most cases, these operators are applicable only to console applications.

Working Directory Specifies the working directory of the program being debugged, relative to the project directory where your EXE is located. If you leave this blank, the working directory is the project directory. For remote debugging, the project directory will be on the remote server.
Attach Specifies whether to launch or attach to the application.
Symbol Path Specifies additional directories where the debugger looks for symbol files. Use a semicolon (;) to separate the paths. For native remote debugging, the symbol path is on the local client. For managed remote debugging, the symbol path is on the remote server.
Debugger Type Specifies the type of debugger to be used: Native Only, Managed Only, Mixed, or Auto.
  • Native is for unmanaged C++ code.
  • Managed Only is for code that runs under the common language runtime (managed code).
  • Mixed invokes debuggers for both managed and unmanaged code.
  • Auto attempts to determine the debugger type based on compiler and EXE information.
SQL Debugging Enables debugging of SQL procedures from your Visual C++ application.
Connection Allows you to switch between local and remote debugging. Specify a remote machine name in the Remote Machine box. Connection types include:
  • Local
  • Remote via DCOM
  • Remote via TCP/IP
  • Remote via Pipe

Visual Studio supports Pipe and TCP/IP connections for native-code debugging only. For more information, see Setting Up Remote Debugging.

Note   TCP/IP debugging may leave the remote machine vulnerable to security violations. Pipe mode debugging is more secure.

For more information, see Remote Debugging Setup.

Remote Machine Specifies the name of a computer (other than yours) on which you want to debug an application. You can also select this from the Processes dialog box (for more information, see Selecting a Remote Machine). If you specify the machine name here, you must also specify the connection type in Connection.

The RemoteMachine build macro exposes the functionality of this property; for more information, see Macros for Build Commands and Properties.

Remote Command The pathname for the .exe as seen by the remote machine.
HTTP URL For ATL Server debugging, specify the URL where the project you are debugging is located.

C/C++ folder (General category)

Setting Description
Debug Information Format (/Z7, /Zd, Zi, /ZI) Specifies the type of debug information to be created for the project.

The default option (/ZI) creates a program database (PDB) in Edit and Continue compatible format. For more information, see /Z7, /Zd, /Zi, /ZI (Debug Information Format).

For details, see PDB Files and DBG Files

Linker folder (Debugging category)

Setting Description
Generate Debug Info (/DEBUG) Tells the linker to include debug information, which will have the format specified by /Z7, /Zd, Zi, or /ZI.
Generate Program Database File (/PDB:name) Specify the name of a PDB file in this box. (You must select ZI or /Zi for Debug Information Format.
Strip Private Symbols (/PDBSTRIPPED:filename) Specify the name of a PDB file in this box if you do not want to include private symbols in the PDB file.
Generate Map File (/MAP) Tells the linker to generate a map file during linking.
Map File Name (/MAP:name) If you choose Generate Map File, you can specify the map file in this box.
Map Exports (/MAPINFO:EXPORTS) Includes exported functions in the map file.
Map Lines (/MAPINFO:LINES) Includes source code line numbers in the map file.

You can change these settings in the Configuration Properties folder (Debug category) programmatically using the VCDebugSettings object. For more information, see VCDebugSettings Object.

See Also

Debugging Visual C++ | Debug Settings and Preparation

Show:
© 2014 Microsoft