This documentation is archived and is not being maintained.

Project Settings for a C# Debug Configuration

You can change the project settings for a 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.

Configuration Properties folder (Debugging category)

Setting Description
Enable ASP Debugging Enables debugging of Active Server Pages (ASP). You must specify a URL in Start URL.
Enable ASP.NET Debugging Enables debugging of server pages written for the ASP.NET development platform. You must specify a URL in Start URL.
Enable Unmanaged Debugging Enables you to debug calls to native (unmanaged) Win32 code from your managed application. This has the same effect as selecting Mixed for Debugger Type in a Visual C++ project.
Enable SQL Debugging Allows debugging of SQL procedures.
Debug Mode Specifies what you are to debug: A Project, which is part of a Visual Studio solution; a URL for a Web application; or a Program that does not belong to a Visual Studio project.
Start Application Specifies the command for launching the program you want to debug.
Start URL Specifies the location of the Web application you want to debug.
Start Page Specifies the Web page where you want to begin debugging.
Command Line Arguments Specifies arguments for the command specified above.
Working Directory Specifies 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.
Always Use Internet Explorer Instructs the debugger to use Internet Explorer as the browser for Internet applications, rather than the default Internet browser you have set up for Visual Studio.
Enable Remote Debugging Allows remote debugging of the machine specified in Remote Debug Machine.
Remote Debug Machine The name of a remote machine where the application will run for debugging purposes. 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.

Configuration Properties folder (Build category)

Setting Description
Conditional Compilation Constants 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 the Debug version. You can also define it in the Release version, if you want that functionality in that version.
Optimize Code Unless 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.
Generate Debugging Information Normally set only in a Debug version of a program, this setting (equivalent to the /debug compiler option) creates debug information at build time. The debugger uses this information to show variable names and other information in a useful form when you are debugging. If you compile your program without this information, debugger functionality will be limited. For more information, see /debug (Emit Debugging Information).
Output Path Normally set to bin\Debug for debugging.

See Also

Debug Settings and Preparation