Setting Source Breakpoints
A source breakpoint is a breakpoint set in the source code and is the
default type of breakpoint.
You can set a source breakpoint in any of the following ways:
-
In the source editor, click in the left margin next to a line of
executable code.
-
In the source editor, click in a line of code then right-click and
choose Toggle Breakpoint (F5).
-
Choose View
Debug Windows
Breakpoints to display the Breakpoints window. Then, right-click
anywhere in this window and choose New Breakpoint
from the context menu. In the New Breakpoint window, select
Source for the breakpoint type, then complete the package, source file
name, and line number information. The source filename should not
include any directory information, but must include the
extension of the file. For example:
Application1.java
or MyWebApp.jsp
Setting breakpoints after starting a program
You'll probably want to set a least one breakpoint before you start
debugging, but it is not necessary. While your program is running in the
debugger, you can set a breakpoint. The program pauses when it reaches
the breakpoint.
Related topics
About Breakpoints
Editing
Breakpoints
Examining Breakpoints
with the Breakpoints Window
Disabling and Deleting Breakpoints
About Valid and Invalid Breakpoints
Setting Exception Breakpoints
Making a Breakpoint Conditional
Pausing and Resuming the Debugger
Copyright © 1997, 2004, Oracle. All rights reserved.