Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Project Settings for C# Debug Configurations

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Project Settings for C# Debug Configurations.

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

System_CAPS_ICON_warning.jpg Warning

This topic does not apply to Windows Store apps. See Start a debug session (VB, C#, C++ and XAML)

SettingDescription
ConfigurationSets mode for compiling the application. Choose among Active (Debug), Debug, Release, All Configurations.
Start ActionThis group of controls specifies the action that will occur when you choose Start from the Debug menu.

- Start project is the default and launches the startup project for debugging. For more information, see Choosing the Startup Project.
- Start external program enables you to start and attach to a program that is not part of a Visual Studio project. For more information, see Attaching to a Running Program.
- Start browser in URL enables you to debug a Web application.
Command line argumentsSpecifies command-line arguments for the program to be debugged. The command name is the program name specified in Start external program. If Start Action is set to Start URL, command-line arguments cannot be specified.
Working directorySpecifies the working directory of the program being debugged. In Visual C#, the working directory is the directory the application is launched from \bin\debug by default.
Use remote machineThe name of a remote machine where the application will run for debugging purposes or an Msvsmon server name. The location of the EXE on the remote machine is specified by the Output Path property in the Configuration Properties folder, Build category. The location must be a shareable directory on the remote machine.
Enable unmanaged code debuggingEnables you to debug calls to native (unmanaged) Win32 code from your managed application.
Enable SQL Server debuggingAllows debugging of SQL Server database objects.
SettingDescription
Conditional compilation symbols:The DEBUG and TRACE constants are defined here.

These constants enable conditional compilation of the Debug class and Trace class. With these constants defined, Debug and Trace class methods generate output to the Output window. Without these constants, Debug and Trace class methods are not compiled and no output is generated.

- Debug is normally defined in the Debug version of a program and undefined in the Release version.
- Trace is normally defined in both Debug and Release versions.
Optimize codeUnless you find a bug that appears only in optimized code, you should leave this setting turned off in the Debug version. Optimized code is harder to debug because instructions do not correspond directly to statements in your source windows.
Output path:Typically set to bin\Debug for debugging.

Debugger Settings and Preparation

Show:
© 2018 Microsoft