Trace
From CometWiki
Debugging your IB programs using the Trace Commands
Introduction: |
The trace statements allow you to easily debug your IB programs whether they run in foreground or background. When Tracing, a "Trace window" pops up on the console of the Comet machine that displays much of what you would want to see to follow the progress of the program. |
Syntax: |
Trace on / Trace off There are several trace commands that control the detail of the information displayed in the trace window, but the only statement you need to use to see tracing is: Trace on This is an executable statement than can be placed anywhere in your program. When Comet encounters this command it will pop up the trace window and tracing will continue until the program ends or the Trace off command is executed. The following commands control the information displayed in the trace window. By default most of these items are enabled when tracing. Trace Labels on/off Displays whenever a program lable is hit during execution Trace Source on/off If the source files are available when executing the program, the source line is displayed. Trace Time on/off A time stamp is displayed on each trace line. This is turned off by default. Trace Events on/off Each time an event is fired in the program, the event information is displayed. Trace Exceptions on/off Each time an exception is encountered in the program, the exception is displayed.
|
Discussion: |
|
Example 2:
Reading a CSV record |
The Trace statement was introduced in Comet 2011 build 444. These commands are available in Comet32 only.