Using Breakpoints and Watchpoints

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:

The GUID-7C73AE63-54D8-465D-87EC-B96630C21353-low.png icon appears in the marker bar when a breakpoint is set, and the GUID-C3DC7A44-4499-489A-A381-7F79319C77F3-low.png icon when a watchpoint is set. A tick mark is added to these icons when the breakpoint GUID-7E8B0EFA-3A1E-44A5-ADB8-A7BA30A1C373-low.png or watchpoint GUID-8B001506-DA69-474B-B384-45DB01B7AA9D-low.png is bound to the program. A program breakpoint is indicated by the GUID-8A0606C0-8A9F-4E36-8471-FD2B11D4A83E-low.png icon.

Note: Breakpoints in Eclipse are set in source files, not in programs (as they are in other Micro Focus products). This means that a single breakpoint may actually be encountered many times if the source file is used in multiple programs or used multiple times in the same program. For example:

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 GUID-40D73419-A8CA-45EB-AF43-1FD23B66FCDB-low.png, both in the margin of the editor and in the Breakpoints view.