Tracing

Tracing refers to instrumenting your application by writing debugging statements in your code. These debugging statements are not removed from your application when it is deployed to production servers; instead, the debugging statement remains functional allowing you to trace unexpected paths of execution in your program. The .NET Framework includes two classes for tracing within the System.Diagnostics namespace: Trace and Debug. These classes derive from the same abstract class and share the same Listeners collection, differing only in the symbol set used for each. These classes are used to diagnose conditions within an application while it is running.

When you compile an application in the default (Debug) configuration, both the DEBUG ...

Get Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) 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.