Tracing

Debug, rework, and resolve defects in code.

  • Create and apply debugging code to components and applications.

The process of testing can reveal the presence of errors in a program, but to find the actual cause of a problem, you sometimes need the program to generate information about its own execution. Analysis of this information may help you understand why the program is behaving in a particular way and may lead to possible resolution of the error.

This process of collecting information about program execution is called tracing. You trace a program's execution in Visual C# .NET by generating messages about the program's execution with the use of the Debug and Trace classes.

The Trace and Debug classes have several things in common:

  • They ...

Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET 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.