Export (0) Print
Expand All

How to: Set Debug and Release Configurations

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Express

No

No

Yes

No

Standard

Yes

Yes

Yes

Yes

Pro/Team

Yes

Yes

Yes

Yes

A Visual Studio project has separate configurations for Release and Debug versions of your program. As the names imply, you build the Debug version for debugging and the Release version for the final release distribution.

If you create your program in Visual Studio, Visual Studio automatically creates these configurations and sets appropriate default options and other settings. With the default settings:

  • The Debug configuration of your program is compiled with full symbolic debug information and no optimization. Optimization complicates debugging, because the relationship between source code and generated instructions is more complex.

  • The Release configuration of your program contains no symbolic debug information and is fully optimized. Debug information can be generated in PDB Files (C++) depending on the compiler options used. Creating PDB files can be very useful if you later need to debug your release version.

You can switch between Release and Debug versions by using the Standard toolbar or the Configuration Manager. For more information, see How to: Create and Edit Configurations.

NoteNote

When you set up Visual Studio, you are asked to choose a set of Development Settings for your primary programming language. If you choose the Visual Basic Development Settings, the tool for choosing the Debug or Release configuration does not appear in the toolbar. Instead, Visual Studio automatically chooses the Debug configuration when you choose Start from the Debug menu and the Release configurations when you use the Build menu. If you want to change the Development Settings, see How to: Restore Hidden Debugger Commands.

To switch to the Debug or Release configuration

  • On the Standard toolbar, choose either Debug or Release from the Solution Configurations list box.

Changing Settings

You can change the settings for a configuration by using the <Project> Property Pages. Depending on the project type, this window will either be a dialog box that contains a tree control on the left for navigating categories — Visual C++ and Web sites — or a tabbed window in the text editor pane of Visual Studio.

To change the settings for the Debug or Release configuration

  1. In Solution Explorer, select the project.

  2. On the View menu, click Property Pages. Or, you can right-click on the project name in Solution Explorer, and select Property Pages.

  3. In the <Project> property page, select either the Debug tab or, if the project type is a Web site, Start Options.

  4. In the Configuration list box, click Debug or Release.

  5. Edit the value of the configuration settings you want to change. Not all debugger-related properties are contained in the Debug page; there are more on the Build page. The exact tabs that are displayed will vary by project type.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft