A breakpoint indicates a line of code or program at which you want the execution of an application to pause, a watchpoint indicates a data item whose change in value causes the execution of your application to pause. When the application is paused, you can view and change the values of data items at that particular step. The Breakpoints property view shows details of all bound breakpoints and watchpoints, and enables you to configure them.
You set breakpoints and watchpoints by:
You can create a breakpoint for any program in the workspace that your application uses by clicking Run > Add Program Breakpoint, or clicking the icon in the Breakpoints view, and entering the name of the file.
The icon appears in the marker bar when a breakpoint is set, and the icon when a watchpoint is set. A tick mark is added to these icons when the breakpoint or watchpoint is bound to the program. A program breakpoint is indicated by the icon.
Main.cbl:
Procedure division. Copy "Code.cpy". … Copy "Code.cpy".
Code.cpy:
Add 1 to count // set breakpoint here
When a breakpoint is set before debugging is started, or no program that uses the copybook is active, the breakpoint is pending. This means that it has not been resolved to a real code position. When debugging is started or a new program is called, the debugger attempts to resolve all pending breakpoints and bind them to actual code positions.
In the above example, when the main executable is loaded by the debugger it binds the single (pending) breakpoint to two actual (bound) breakpoints. The breakpoints are then shown with a plus sign added to the breakpoint icon , both in the margin of the editor and in the Breakpoints view.