ASP.NET Tracing

Error handling and tool-assisted debugging are essential instruments to make an application run without anomalies and recover gracefully from unexpected exceptions. Tools for tracing complete the kit. Tracing refers to the ability to output messages commenting on the execution of the code. This feature is extremely useful for tracking data inconsistencies, monitoring the flow, asserting conditions, and even gathering profiling information.

The .NET Framework comes with a rather feature-rich set of tools for tracing applications. In particular, the Systems.Diagnostics namespace defines two classes, named Trace and Debug, whose methods can be used to trace the code. The Trace and Debug classes are essentially identical and work on ...

Get Programming Microsoft® ASP.NET 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.