Cubic Compass Software

- Support Wiki

How To Enable Trace Logging

Modified: 2009/06/26 05:15 by mleach - Categorized as: Dialogue Script

Enable Trace Logging

Debugging applications often requires access to complete details about the web application context. Logging in as an Administrator and extending any i-Dialogue web page URL with ?trace=1 will produce a detailed trace log report about the page request.

Often times the state of variables are written to temporary dlog Labels to display debug information. However, this debug code must be removed before deploying a script into production. But Trace.Write statements may remain in the original source code, even in production. They're only executed when the trace=1 parameter is included in the URL.

Trace logs may contain secure information, therefore only site Administrators are authorized to extend URLs with trace=1.


Example Trace Log URL 

Code may be injected into Dialogue Script and written to the trace log using the following syntax:

from System.Web import *

if Page.IsPostBack == False:
    HttpContext.Current.Trace.Write("Trace message written from page load")
    HttpContext.Current.Trace.Write("Trace message written from page post back")

myResult = 2 + 2
HttpContext.Current.Trace.Write("The value of variable myResult is " + str(myResult))


ScrewTurn Wiki version 2.0.35. Some of the icons created by FamFamFam.