Performing visual debugging for an application

After a debug session is started with visual debugging enabled, you can step through your program and visualize the call stack, and set or remove breakpoints in the Visual Debug view.

About this task

By default, the Visual Debug view displays the paragraph or procedure nodes of the current program. When a debug session is started, only the program node is highlighted at the beginning. In this example, a COBOL program called SAM1 is used for illustration.

Procedure

  1. Step over a few times until you reach a PERFORM statement in your COBOL program.
    Step over to reach a PERFORM statement
  2. Do a step into.
    A new stack frame 700-OPEN-FILES appears, and the node 700-OPEN-FILES is highlighted in the Visual Debug view. In the editor, the entry of paragraph 700-OPEN-FILES is located and highlighted.
    The editor is positioned to the entry of paragraph 700-OPEN-FILES.
  3. Show the entire paragraph diagram.
    Click the arrow on the right side of the visual debugging toolbar icon, clear the Only Show Current Execution Path option. The Visual Debug now shows the entire paragraph diagram for the current program. For more information about the filter, see Only Show Current Execution Path.
    The Visual Debug view now shows the entire paragraph diagram for the current program.
  4. Set a paragraph entry breakpoint by right-clicking a paragraph node in the Visual Debug view and clicking Toggle Breakpoint.
    In this example, a breakpoint is set on the 220-PROCESS-DELETE-TRAN paragraph. A breakpoint indicator icon is displayed on node 220-PROCESS-DELETE-TRAN to show the existence of a breakpoint on this paragraph.
    Toggle breakpoint
  5. Resume the debug session.
    The breakpoint is hit, and the stack trace is highlighted in the Visual Debug view.
    The breakpoint is hit and the stack trace is highlighted in the Visual Debug view.
  6. When you no longer need a breakpoint, remove the breakpoint by right-clicking the node the breakpoint was set on and clicking the Toggle Breakpoint action again.
    The breakpoint indicator on the paragraph node is removed.