trace specific parts of a COBOL application

The Elastic COBOL compiler allows the user to embedded tracing statements within the program by using one of many compiler options such as -run:trace .However this can lead to rather lengthy outputs when attempting to trace a large COBOL application. In order to reduce the amount of output generated, the Elastic COBOL IDE allows the user to specify at which parts of the application the trace information should be output.  This is achieved by indicating to the COBOL stack frame that the trace output needs to be toggled on/off. Access to the COBOL stack frame can be obtained from the Debug view when the COBOL program is suspended at a breakpoint.

The following describes an example of turning the output trace on/off. 

Start the application/program in the debug mode from within the IDE.

If the debug view is not open , use the menu option  [Window/Show View/Debug] to open the view.

Either at the beginning of the debug run or at a breakpoint, select  the top COBOL stackframe and right click as shown in the figure below. Select the "Output Trace" menu option to either toggle on or off.  At the next breakpoint repeat the process to turn on/off the trace as required.

The ability to turn trace on /off is specific to each  application run and is also  stored in the launch configuration so the next time the program is debugged it will remember the last selected state.




Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk