Diagnostics and Debugging

This tutorial covers the support provided by ASP.NET for figuring out what's wrong with your ASP.NET application. As you can imagine, debuging Web applications introduces a whole new set of challenges. Remember, HTTP is basically connectionless, and the only thing the client really gets to see is a snapshot of the application.

This tutorial shows you how to watch your application as it runs and trace the state of any particular request. We'll also cover managing error pages and trapping application exceptions within ASP.NET.

After completing this tutorial, you will be able to

  • Turn on page tracing
  • Insert custom trace messages into the page trace
  • Turn tracing on for the entire application
  • Manage custom error pages
  • Manage exceptions within your application

Even with all the software architecture methodologies and development practices available these days, software is still very much a craft. Software libraries such as ASP.NET and Windows Forms go a long way towards making development more standardized and predictable (good things in software practice). However, there are still almost inevitable periods when you need to figure out what's wrong with an application that decides to behave differently than you expected it to.