There is a debugging tool to assist you in debugging your Post postprocessor.
The debugging tool can be found in the TCL file named mom_debug.tcl.
The Post debugging tool allows you to see the events and their associated variables as they are triggered while postprocessing. You can step through all the events as they are triggered one by one and see the values assigned to associated variables in the events while postprocessing.
To activate the debugging tool, two things must be done.
First, the file mom_debug.tcl must be "sourced" at the beginning of the event handler file. This file contains the event debugging tool and should be specified with the complete path, as shown in the following example:
source /usr/eds105/mom_tools/mom_debug.tcl
Second, the debug mode must be turned on by placing the following command immediately after the "source mom_debug.tcl" statement in the event handler.
MOM_set_debug_mode ON
To have the debugger available at all times in the event handler, place these statements in the script, but outside of any proc.
The debugging tool creates a trace that lists the values of addresses and variables that are loaded for each event. Refer to Error Messages for an example of an Output File that was created with the debug feature activated.
After after activating the debugger as described above, the dialog shown in the following figure is displayed when the postprocessor is executed.
The Debug dialog allows you to specify the type of information that you want to see for each event.
Debug Dialog
The Debug dialog options are described as follows:
When toggled ON, the variables associated with the current event, and their values, are written out to the Debug information window.
When toggled ON, the addresses associated with the current event, and their values, are written out to the Debug information window.
The default status of this button is ON.
When toggled ON, the event number associated with the current event is written out to the Debug information window.
The default status of this button is OFF.
By switching this toggle button ON and specifying the "From" event number and "To" event number and choosing OK, you can debug the events occurring within the specified range. The information related to events occurring outside of the specified range will not be displayed debug information window.
When toggled ON, the event number associated with the current event is written out to the Debug information window.
The default status of this button is OFF.
This executes Post in debug mode.
This executes Post without debug mode.
Debug Information Window
Selecting Step causes Post to execute the next event and write specified information to the Debug information window. The figure above illustrates how the Debug information might look with the Variables, Addresses and Display event numbers options all active.
Selecting Go causes Post to execute to completion without further display of individual event information.
The Post debugging tool also creates a file "mom_debug_all.out". This file is created in the directory where the NX session was started. This file contains a listing of all the events, associated variables, and addresses that have been triggered during postprocessing. This file is overwritten every time the Post debugging tool is executed.