Compartilhar via


How to: Set Debug and Release Configurations

Visual Studio projects have separate release and debug configurations for your program. As the names imply, you build the debug version for debugging and the release version for the final release distribution.

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, depending on the compiler options that are used. Creating PDB files can be very useful if you later have to debug your release version.

For more information about build configurations, see Understanding Build Configurations.

You can change the build configuration from the Build menu, from the toolbar, or in the project’s property pages. Project property pages are language-specific. The procedure below shows how to change the build configuration from the menu and the toolbar. For more information about how to change the build configuration in projects in different languages, see the Related Topics section below.

To change the build configuration

  1. From the Build menu: click Build / Configuration Manager, then select Debug or Release.

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

    build configuration toolbar

    This toolbar is not available in Express editions. You can use the Build Solution F6 and Start Debugging F5 menu items to choose the configuration.

See Also

Tasks

How to: Create and Edit Configurations

Reference

Project Settings for a C++ Debug Configuration

Debug and Release Project Configurations

Concepts

Project Settings for C# Debug Configurations

Project Settings for a Visual Basic Debug Configuration

Other Resources

Debug Settings and Preparation