Top
NetCOBOL V11.0 NetCOBOL Studio User's Guide
FUJITSU Software

7.3.1 Breakpoints

A breakpoint is represented by a mark indicating a specified point in a program at which the debugger can be stopped. This section shows how to add and delete breakpoints, as well as how to use breakpoints.

7.3.1.1 Adding a breakpoint

To add a breakpoint:

  1. Use the COBOL editor to open the file to which to add a breakpoint.

  2. Immediately to the left of the line to which to add the breakpoint, select "Add Breakpoint" from the context menu of the vertical ruler.

  3. The breakpoint mark is displayed on the vertical ruler. The breakpoint is displayed in the list of the "Breakpoints" view.

Point

A breakpoint can also be set by double-clicking on the vertical ruler.

Note

If a breakpoint is set in a COBOL library, and that library is used by multiple COPY statements, the breakpoint will be hit in each of those cases and the program will be interrupted.

7.3.1.2 Deleting a breakpoint

To delete a breakpoint:

  1. Select the breakpoint to be deleted, from the "Breakpoints" view.

  2. Select "Remove Breakpoint" from the context menu.

Point

A breakpoint can also be deleted by double-clicking on it in the marker bar.

7.3.1.3 Using breakpoints

When control reaches a breakpoint during execution of a program, the debugger halts execution. The program calling path and data item values can be referenced at this point in time. The breakpoint can be enabled or disabled, and its hit count can be specified using breakpoint properties. The breakpoint properties can be displayed using the context menu of the vertical ruler or the context menu of the "Breakpoints" view.

Once a breakpoint is set, it is maintained across multiple sessions until it is explicitly deleted. Breakpoints are saved even when their file, which is open in the COBOL editor, is closed. The set breakpoints are displayed the next time the file is opened.

7.3.1.4 Hit count of a breakpoint

Execution of a program can be halted by using the hit count of a breakpoint. Execution is halted when the line at which the breakpoint is set has been executed the number of times specified for the hit count.

  1. Set a breakpoint using the COBOL editor.

  2. Select the breakpoint from the "Breakpoints" view, and then select "Hit Count..." from the context menu.

  3. Set the hit count of the breakpoint, and enable or disable the hit count of the breakpoint in the "Set Breakpoint Hit Count" dialog box.

Note

The hit count of the breakpoint in the COBOL library is the total execution count of the breakpoint, even though the COBOL library may be used by several COPY statements.