Setting a Breakpoint in a Line

The Toggle Breakpoint control in the Source Editor is the quickest way to set a breakpoint in a line of source code. If you know the number of the source code line, you can also use the Breakpoints tab to set this type of breakpoint.

To set and remove breakpoints using the Source Editor, your source file must meet one of the following conditions:

Using the Source Editor:

  1. Position the pointer at the line where you want the breakpoint to occur.

  2. Click the Toggle Breakpoint control .

    The Java WorkShop sets a breakpoint in the specified line and highlights the line in red. The class name and line number are added to the Breakpoints tab.

Using the Breakpoints tab:

  1. Click the Breakpoints tab in the debugger.

  2. In the Stop At Line region, type the class name in the Class field.

    If the class is part of a package, type the full class name, including the package (for example, sun.jws.web.Paint).

  3. Type the line number in the Line Number field.

  4. Click the Stop At button.


See also:

Introduction to Breakpoints
Setting a Breakpoint in a Method
Setting a Breakpoint in a Class
Breakpoints Tab