Step 2. Setting A Breakpoint

previous step next step


A breakpoint is set to mark a point in the source code that that the debugger program should stop executing and wait for further instructions from the person running the debugging session. Multiple breakpoints may be set at any time.

Set a breakpoint on the third line of the main method where the refreshDisplay() method is called.

To set a breakpoint:

  1. Click on the main(...) method in the Outline pane to get the main method's source code in the Text pane.
  2. Move the selection arrow to the shaded area to the right of the desired line of code.
  3. Right click and select Toggle Breakpoint.

A breakpoint marker will appear where you have clicked and an entry corresponding to the breakpoint will appear in the Breakpoints pane on the upper right.

If the Breakpoints pane is not showing, click on it to see the current list of breakpoints that have been set.

The breakpoint can be removed by toggling it again. The corresponding entry in the Breakpoints pane will disappear if you do this. You manage and keep track of your breakpoints in the Breakpoints pane once you have set them in the source pane.


previous step next step