In this chapter
ASP.NET greatly enhances your ability to debug applications. It also offers a comprehensive tracing capability. If you have done much ASP developing in the past, you know how overlooked this has been. ASP developers traditionally have not had the debugging tools that Visual Basic and C++ developers have had. Even though there was a debugger of sorts, it wasn't the world-class debugger that comes with ASP.NET. It has been difficult to debug classic ASP applications.
This chapter talks about tracing in ASP.NET, debugging in ASP.NET, and then goes on to present some general debugging tips. For most developers this is an important chapter because you will invariably find yourself spending a lot of time debugging your applications.
In the past, while I was developing classic ASP, I spent a lot of time coming up with creative ways to use the Response.Write() method to find out what was going on in my ASP code. It usually involved outputting some string or numeric variables to the HTML stream so that I could read their values. Sometimes I wrote log files to disk, and then examined them after the application had run. This was very cumbersome because anything I put into my ASP code simply cluttered it up and made it that much harder to read. And outputting variables to an HTML stream means that the HTML that your client browser sees is in some way different than what you will see after you remove all the debug code. This can make it very difficult to debug ASP applications, especially when the output formatting is a big part of what you are trying to debug.