Debugging Not Enabled Dialog Box
If you want to debug a Web page while running it in Microsoft Visual Web Developer, the page must be compiled with debugging information. By default, pages are not compiled with this required debugging information. You can set a page to compile with debugging information in two ways:
For an individual page by adding the attribute debug="true" to the page'sdirective.
For the site as a whole by adding the attribute debug="true" to theproperty of the site's configuration (Web.config) file.
The Debugging Not Enabled dialog box is displayed when you run a page using the debugger (for example, by pressing F5) but the Web site is not configured to compile with debugging information. (The dialog box is displayed even if the current page is configured to debug, because Visual Web Developer cannot determine whether you might attempt to step into another page or component from the current page.)
The dialog box offers you the option to automatically configure the Web site to compile pages with debugging information or to run the page without debugging.
It is important to disable compilation with debugging information before deploying the site to a production server. Compiling with debugging information affects the size and performance of your application. Debugging is disabled by either completely removing the debug="true" attribute, or setting it to false in all the locations where it exists (check for debug attributes in the @Page directive, and in the Web.config file).
- Add a new Web.config file with debugging enabled
The Web site contains no Web.config file; therefore, there is no site-wide setting for debugging. This option creates the Web.config file (equivalent to adding it using the Add New Item dialog box) and sets the debug attribute of the Compilation property to true.
Add a new Web.config file with debugging enabled appears only if you do not have a Web.config file in the Web application.
- Modify the Web.config file to enable debugging
The Web site contains a Web.config file, but it either does not contain a Compilation property or the debug attribute of the Compilation property is set to false. If you choose this option, Visual Web Developer either adds the element or changes it to enable debugging.
- Run without debugging
Visual Web Developer compiles and runs the page without debugging information; the debugger is not started. The page runs as it would in a browser. Use this option if you want only to test the page without hitting breakpoints, stepping through code, and so on.