Home > DeveloperSection > Interviews > What is tracing? Where is it used?

Posted on    August-28-2014 11:52 PM

 ASP.Net ASP.Net 
 1 Answer(s)
  778  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    August-28-2014 12:00 AM

Tracing displays the details about how the code was executed. It refers to collecting information about the application while it is running. Tracing information can help you to troubleshoot an application. It enables you to record information in various log files about the errors that might occur at run time. You can analyze these log files to find the cause of the errors.

In .NET, we have objects called Trace Listeners. A listener is an object that gets the trace output and stores it to different places, such as a window, a file on your locale drive, or a SQL Server.

The System.Diagnostics namespace contains the predefined interfaces, classes, and structures that are used for tracing. It supplies two classes, Trace and Debug, which allow you to write errors and logs related to the application execution. Trace listeners are objects that collect the output of tracing processes.

Don't want to miss updates? Please click the below button!

Follow MindStick