What is tracing in .NET? | Eklavya Online

What is tracing in .NET?

Tracing helps to see the information of issues at the runtime of the application. By default Tracing is disabled.

Tracing has the following important features:

  1. We can see the execution path of the page and application using the debug statement.
  2. We can access and manipulate trace messages programmatically.
  3. We can see the most recent tracing of the data.
    Tracing can be done with the following 2 types.

Page Level
When the trace output is displayed on the page and for the page-level tracing we need to set the property of tracing at the page level.

<%@ Page Trace=”true” Language=”C#”

Application Level
In Application-Level tracing the information is stored for each request of the application. The default number of requests to store is 10. But if you want to increase the number of requests and discard the older request and display a recent request then you need to set the property in the web.config file.