Using breakpoints

Breakpoints are temporary markers that you place in your executable program to tell the debugger to stop your program at a given point. When the debugger encounters a breakpoint, the debugger suspends execution at the breakpoint before it executes the statement. At this point, you can you can see the stack for the thread and check the contents of variables, registers, and memory. Then, you can step over (execute) the statement and see what effect it has on the argument.

About this task

The debugger supports the following types of breakpoints while you debug System z® applications:

The Breakpoints view displays a list of all breakpoints for all debug sessions. You can reduce the number of breakpoints displayed by doing the following options:
  • To filter out breakpoints that are not related to the current debug session, click Show Breakpoints Supported by Selected Target push button in the Breakpoints view.
  • To link the Breakpoints view with the Debug view, click the Link with Debug View toggle. When you select this toggle and a breakpoint suspends a debug session, the Breakpoints view automatically selects that breakpoint.

The breakpoint entries in the list provide you, in brackets, with a summary of the breakpoints' properties. With pop-up menu options, you can add breakpoints, remove breakpoints, and enable or disable breakpoints. If you have Debug Tool for z/OS®, Version 6 Release 1 or later, you can also edit breakpoint properties with a pop-up menu option. With push buttons in the Breakpoints view, you can remove breakpoints.

When you choose to edit a breakpoint, the wizard by which it was created opens (if you did not use a wizard to create the breakpoint, the wizard for the breakpoint type opens). While in the wizard, you can click Next > or < Back if you only want to view the breakpoint settings in the wizard. Once you are finished viewing the breakpoint settings, click Cancel to exit the wizard without making any changes.

Breakpoints can be enabled and disabled with pop-up menus in the Breakpoints view or the editor and by check box in the Breakpoints view. When a breakpoint is enabled, it will cause all threads to suspend whenever it is hit. When a breakpoint is disabled, it will not cause threads to suspend. For further information about enabling and disabling breakpoints, see the related topic.

In the Breakpoints view, there are two indicators to the left of a set breakpoint (). To the far left is a check box which indicates if the breakpoint is enabled (when enabled, the check box contains a check mark). To the near left, an indicator with a check mark overlay indicates a breakpoint that has been successfully installed by the debug engine (if the breakpoint is enabled, this indicator is filled - if the breakpoint is disabled, this indicator is not filled). In the editor, statement breakpoints are indicated by an indicator with a check mark overlay, indicating a breakpoint that has been successfully installed by the debug engine (if the breakpoint is enabled, this indicator is filled - if the breakpoint is disabled, this indicator is not filled)

Breakpoints must be installed before they will suspend execution. It is possible to add a breakpoint that is not valid for the current debug session. This breakpoint will not be installed until it is part of a debug session which includes a debug engine that will recognize the breakpoint.

In the editor, statement and entry breakpoint indicators are displayed in the marker bar to the left of the editor. Indicators for statement, entry, address, watch, and load breakpoints are displayed in the Breakpoints view.

While in the Breakpoints view, the source editor will open to the location of a breakpoint if you do one of the following:

Procedure

Results


Feedback