ASP.Net Debug and Trace
In ASP.Net, one can enable debug and tracing via the Web Configuration file. Debug will enable web application debugging and tracing will enable generating the diagnostic information about web requests. In this Lab, we will see how to enable Debug and Tracing using Asp.Net Web Configuration Tool.
1: Run Visual Studio 2010 as Admin
When you start the Visual Studio, run it as an administrator. Follow these steps:
1) From the Start Menu Navigate to Visual Studio 2010 Menu Item and right click on it.
2) Then pick the option ‘Run as Administrator’.

These steps will launch Visual Studio in Administrator Mode. This will help us in making the configuration changes smoothly.
2: Asp.Net Configuration Tool
ASP.Net Configuration tool will help in editing the web.config file. All website configuration settings stay in the xml-based web.config file. Now, we will edit this file using the built-in config tool.
1) Click on the Menu Website to open the menu items.
2) Then pick the menu item named, ‘ASP.NET Configuration’. This will open your default browser to display the config tool.

3: Turn ON Debug & Trace
1) From the displayed Web Site Administration Tool, click the Application tab. You can see settings in different sections.
2) Move to Debugging and Tracing section, then click on the Configure option.
3) From the displayed UI, you can turn on Debugging and Tracing by checking the relevant check boxes. In the below screen, we enabled only the debugging option. After this step, you can click on the back button to go back to the main screen.
4) Quit the Browser session and Click on the Visual Studio 2010.
4: Check the Web.Config File
- Once you come out of ASP.Net Config tool, Visual Studio informs you that the configuration file is changed. Accept the changes and double click to open the web.config file.
- In the config file, you can see the debug configuration added by the ASP.Net Web Config tool.

Categories: ASP 4.0
Tags: Asp.Net Configuration Tiil, web.config