![]() |
ALPHA-VISION® Debugging: Trace |
If tracing is on, a trace file per BDC file is generated
in the same folder, and with the same name as the BDC file
but plus an extension .trace.html.
The file may be viewed with any browser.
Tracing will always stop at the end of the script as if Trace(0) had been called.
As with all functions it is also possible to supply the value of an object or the return value of a function as argument of Trace() to enable conditional tracing.
If a script is too large and only a part if it is of interest, call Trace(1) to start tracing and later in the script Trace(0) to stop tracing.
If the script is within a figure, this will also be indicated in the file, but trace files will be generated for the displays where the figure is visible at runtime.
If a button in a display file MyDisplay.dis.xml has the following action script:
Trace(1);
If(IsEqual(OBJ.MyObj.String, "abc"))
{
SetVal(OBJ.MyObj2.Value, 2);
}
Assuming that MyObj.String is "abc" a file MyDisplay.dis.xml.trace.html
will be written with the following content: