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: