Line Breakpoints

Line breakpoints are set on an executable line of a program.

Adding

1.

In the editor area, open the file where you want to add the breakpoint.

2.

In the editor, directly the left of the line where you want to add the breakpoint, access the context menu from the marker bar (the vertical bar to the left of the main text area).

3.

Do one of the following:

  • From the marker bar's context menu, select Add Breakpoint.
  • Double-click the marker bar.

4.

A new breakpoint marker appears on the marker bar, directly to the left of the line where you added the breakpoint. Also, the new breakpoint appears in the Breakpoints view's list.

While the breakpoint is enabled, thread execution suspends before that line of code is executed. The debugger selects the thread that has suspended and displays the stack frames on that thread's stack. The line where the breakpoint was set is highlighted in the editor in the Debug perspective.

Deleting

1.

In either the marker bar or the Breakpoints view, locate the breakpoint that you want to delete.

2.

From the breakpoint's context menu, select Remove (in the Breakpoints view) or Remove Breakpoint (in the marker bar).

3.

The breakpoint disappears from the marker bar and from the Breakpoints view.

Note: If you want to delete all breakpoints in the view, click the Remove All Breakpoints button in the Breakpoints view (or select Remove All from the view's context menu). Keep in mind that this command removes all breakpoints in the entire workbench, not just in the active program.

Enabling & Disabling Breakpoints

To enable or disable a single breakpoint from the Breakpoints view:

1.

In the Breakpoints view list, locate the marker for the breakpoint that you want to enable or disable.

2.

From the breakpoint marker's context menu, select either Enable or Disable.

3.

Notice that the marker for the breakpoint changes to reflect its current status.