Debugging ASP.NET Web Applications During Development
ASP.NET is the primary technology for developing Web applications in Visual Studio .NET. The Visual Studio debugger provides powerful tools for debugging ASP.NET Web applications locally or on a remote server. This topic describes how to debug an ASP.NET project that is still under development. For more information, see Debugging a Deployed ASP.NET Web Application.
Note By default, the ASP.NET process (aspnet_wp.exe for IIS5.0 and IIS 5.1 on Windows 2000 and Windows XP or w3wp.exe on IIS6 on Windows Server 2003) runs as an ASPNET process. As a result, you must have Administrator privileges on the machine where ASP.NET runs to debug it.
To debug a Web application during development
- If you have not already done so, set debug mode for the configuration file of application (Web.config). For more information, see Debug Mode in ASP.NET Applications. Debug mode tells ASP.NET to generate symbols for dynamically generated files and enables the debugger to attach to the ASP.NET application. (Projects created from the Web projects template will have this set automatically. For more information, see ASP.NET Web Application Template.)
- In Visual Studio .NET, use the <Project> Property Pages to set project properties for Web application debugging.
- To start debugging the Web application, choose Start from the Debug menu.
Visual Studio .NET builds the Web application project and deploys the application and its symbol information to the Web server.
- Use the Debugger to set and clear breakpoints, step, and perform other debugging operations, as you would for any application. For more information, see Using the Debugger.
- To end the debugging session, choose Stop Debugging command on the Debug menu in Visual Studio or choose Close from the File menu in Internet Explorer.