Chapter 16: Debugging, Testing with Emulators, and Handling Run-Time Errors
Overview
As developers, we all want to write perfect code all the time. Of course, in the real world, although perfect code is the ideal, it's never the reality. Fortunately, Microsoft ASP.NET and ASP.NET Mobile Controls offer lots of help with tracking down the bugs and analyzing the errors that are the symptoms of imperfect code. If you're using Microsoft Visual Studio .NET, the integrated debugger serves as a valuable tool for examining applications while they're executing. The Microsoft .NET Framework SDK also includes a lightweight debugger that you can use when working outside Visual Studio .NET.In this chapter, you'll learn how to configure your applications to support debugging with Visual Studio .NET or the debugger that ships with the .NET Framework SDK. You'll see how to use the ASP.NET Trace facility, a valuable tool that allows you to monitor execution time and the order of execution of methods, examine HTTP headers, and write your own debug output. You'll also find out how to trap run-time errors and implement custom error pages to display to your users instead of using the developer-oriented error display. And finally, you'll learn how to set up different mobile device emulators for testing.