Export (0) Print
Expand All

How to: Set Debug and Release Configurations

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

You can switch between Release and Debug versions by using the Standard toolbar or the Configuration Manager.

Note Note

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. To change the Development Settings, see How to: Restore Hidden Debugger Commands. After you change the Development Settings, make sure that Show advanced build configurations is selected in the Options dialog box, Project and Solutions category, General page.

To switch to the Debug or Release configuration quickly

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

  • This toolbar is not available in the Visual Basic Express or Visual C# Express. You can use the Build Solution F6 and Start Debugging F5 menu items to choose the configuration.

To switch to the Debug or Release configuration

  1. In Solution Explorer, select the project.

  2. On the View menu, click Property Pages.

  3. Click the Build or Debug tab, in a Visual C# or a Visual F# project, the Compile or Debug tab, in a Visual Basic project, or Configuration Properties, in a Visual C++ project.

  4. In the Configuration drop-down list, click Debug or Release.

Show:
© 2014 Microsoft