Backward tracing while debugging


While debugging COBOL files, you can trace execution in reverse. Backward tracing is only available for CICS, BATCH, and IMS for COBOL programs.

To enable the backward tracing

  1. Start a COBOL program debug session. You see the monitor icon when the debug session is initiated.
    image-2024-6-19_21-51-33.png

  2. Click the monitor icon (image-2024-6-19_21-52-44.png). Select any one of the following options.

    • Turn On Monitoring for the Active Program: Activates monitoring for the current program.
    • Turn On Monitoring for All Programs: Activates monitoring for all open programs.

When you trigger the next debug event, you see two new icons.


    • image-2024-6-19_21-59-15.png(Review Step Backward): Moves the debugger cursor one step back in the execution history.

    • image-2024-6-19_22-0-2.png(Review Continue Backward): Moves the cursor back to the last breakpoint encountered.

When you start backward debugging, you see the Exit Review Mode icon (image-2024-6-19_22-3-13.png). Click image-2024-6-19_22-3-13.pngto return the debugger cursor to the starting point of the reverse trace.

If you want to stop monitoring then clickimage-2024-6-19_22-7-29.png. This also hides the monitoring controls.

Important

  • When monitoring is initiated, the debug console displays a message: Program <program name> is being monitored.
  • You can navigate backward to the next breakpoint or the initiation point of monitoring.
  • The views for variables and watched variables should be updated to reflect changes.
  • If execution history does not exist, you see a notification: Unable to enter Review mode because there is no history available for the current program.
  • When you reach the buffer limit while attempting to backtrace further, you see an error message: The beginning of the monitor buffer has been reached. The review mode direction has changed to forward.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*