This documentation is archived and is not being maintained.

How to: Debug Web Applications and Web Services

This topic applies to:


Visual Basic



Web Developer


Topic does not applyTopic does not applyTopic does not applyTopic does not apply


Topic appliesTopic does not applyTopic does not applyTopic applies

Pro and Team

Topic appliesTopic does not applyTopic does not applyTopic applies

Table legend:

Topic applies


Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

ASP.NET is the primary technology for developing Web applications in Visual Studio. 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 during development. For information about how to debug a ASP.NET Web application already deployed on a production server, see Debugging Deployed Web Applications and Web Services.

To debug an ASP.NET application:

  • You must have required permissions. For more information, see ASP.NET Debugging: System Requirements.

  • ASP.NET debugging must be enabled in Project Properties.

  • The configuration file of your application (Web.config) must be set to debug mode. Debug mode causes ASP.NET to generate symbols for dynamically generated files and enables the debugger to attach to the ASP.NET application. Visual Studio sets this automatically when you start to debug, if you created your project from the Web projects template.

  • For more information, see How to: Enable Debugging for ASP.NET Applications.

To debug a Web application during development

  1. On the Debug menu, click Start to begin debugging the Web application.

    Visual Studio builds the Web application project, deploys the application if necessary, starts the ASP.NET Development Server if you are debugging locally, and attaches to the ASP.NET worker process.

  2. Use the Debugger to set and clear breakpoints, step, and perform other debugging operations, as you would for any application.

    For more information, see Debugger Roadmap.

  3. On the Debug menu, click Stop Debugging to end the debugging session, or, on the File menu in Internet Explorer, click Close.