Chapter 9 – Debugging ASP.NET

Error handling is an important aspect of software development. Good robust applications anticipate various errors and take an active role in resolving them without crashing the program. The chapter discusses two distinctive methods of error handling—structured and unstructured. While the unstructured error handling mechanism continues to be supported in .NET, it is recommended that programmers make the switch to the structured error handling mechanism using the Try-Catch-Finally statement. Besides handling errors, the new tracing capability found in .NET makes the life of a programmer much easier. No longer do you have to insert Response. Removing the Trace statements during deployment is simply a matter of setting an attribute. Finally, Visual Studio .NET allows you to set breakpoints in your application so that the flow of variables and codes can be examined during runtime.