The following example shows the default output when page-level tracing is enabled. Using TraceContext , you can write debugging statements using the Trace. Write and Trace. Warn methods, which each take a message string or a category and message string.
Warn statements are identical to Trace.
This makes it possible to keep debugging statements in production code and enable them conditionally at a later time. Often you might need to run additional code to construct the statements to pass to the Trace. Write or Trace. Warn methods, where this code should only run if tracing is enabled for the page. To support this, Page exposes a Boolean property, Trace.