Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Developer's Guide
Tracing and Instrumenting Applications

Tracing is a way for you to monitor the execution of your application while it is running. You can add tracing and debugging instrumentation to your .NET Framework application when you develop it, and you can use that instrumentation both while you are developing the application and after you have deployed it. With the Trace and Debug classes, you can record information about errors and application execution to logs, text files, or other devices for later analysis.

Instrumenting your application by placing trace statements at strategic locations in your code is especially useful for distributed applications. With trace statements you can instrument an application not only to display information when things go wrong — you can also display information to monitor how well the application is performing.

The Trace and Debug classes are identical except that procedures and functions of the Trace class are compiled by default into release builds, but those of the Debug class are not. The following topics provide additional information on using instrumentation in your applications.

Introduction to Instrumentation and Tracing

Provides an overview of basic concepts of instrumentation and code tracing.

Trace Switches

Describes the use of switches to filter tracing messages based on complex criteria.

Trace Listeners

Describes the use of listeners to route tracing messages to particular output targets.

How to: Trace Code in an Application

Describes the major steps involved in instrumentation and tracing.

How to: Add Trace Statements to Application Code

Provides several techniques for using tracing and debugging messages in your applications.

How to: Compile Conditionally with Trace and Debug

Gives directions for including tracing options in compiled applications.

Trace Sources

Describes the use of the TraceSource class as an alternative to the older static Trace and Debug classes.

Trace

Provides a detailed reference for the Trace class and its members.

Debug

Provides a detailed reference for the Debug class and its members.

TraceSource

Provides a detailed reference for the TraceSource class and its members.

Debugging Preparation: C# and Visual Basic Project Types

Provides links to managed code debugging topics.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
see TraceSources ~~ enhanced tracing system      gerry lowry   |   Edit   |   Show History

http://msdn.microsoft.com/en-us/library/ms228989.aspx
"the recommended practice is to use the TraceSource class for tracing"
imo, the above recommendation needs to appear on *this* page too(http://msdn.microsoft.com/en-us/library/zs6s4h68.aspx).

Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker