Chapter 3. Debugging ASP.NET Applications
IN THIS CHAPTER
Tracing Your Web Application's Activity
Debugging ASP.NET Applications
Creating Custom Performance Monitors
Writing to the Windows Event Log
Reference
Debugging ASP.old applications was generally only slightly less painful than a trip to the dentist. There was a way to debug ASP.old applications, but it was poorly documented and essentially required Visual InterDev and a team of crack technicians, as well as favorable weather conditions and a whole lot of luck to work correctly.Many ASP.old developers got into the habit of using code like the following as a way of creating breakpoints in their code:
This is about the least-efficient kind of debugging code you can possibly write. It's the coding equivalent of driving a car off a cliff just to lift up the hood. At the very least, you should have a way of figuring out what's going on in your application without having to stop its execution.It should come as no surprise, then, that ASP.NET recognized the severe shortcomings in debugging Web applications and came up with a number of compelling solutions. In ASP.NET, you can perform various useful and detailed inspections into the inner workings of your running applications.Debugging and tracing in ASP.NET applications doesn't require Visual Studio .NET. (This book doesn't assume you have Visual Studio, either.)We'll begin our exploration of debugging ASP.NET applications with a discussion of tracing and then move on to debugging and other diagnostic services provided by ASP.NET and the .NET framework.
Response.Write "DEBUG: Maybe this will work now."
Response.End