A breakpoint is a flag in the source code that tells the debugger to stop execution of the program. When your program stops on a breakpoint, you can examine the value of variables, single-step through your program, examine the state of your program, and so on.
The Source Editor indicates a breakpoint by highlighting the line in red and placing an annotation in the left margin. The following table describes the debugging annotations.
Annotation | Description |
---|---|
![]() | Breakpoint |
![]() | Disabled breakpoint |
![]() | Multiple breakpoints |
![]() | Conditional breakpoint |
![]() | Disabled conditional breakpoint |
![]() | Program counter |
![]() | Program counter and one breakpoint |
![]() | Program counter and multiple breakpoints |
![]() | The call site or place in the source code from which the current call on the call stack was made |
The types of breakpoints that are available to you is dependent upon the debugger that you are using. For example, if you are using the Java 2 debugger, you can set a breakpoint on a specific line number, method name, exception, class, thread, or variable. You can manage breakpoints in the Breakpoints window.
When you save a program, the IDE saves each breakpoint. The next time you open the program, the breakpoints reappear exactly as you set them.
See Also | |
---|---|
Setting a Java Breakpoint Modifying Breakpoint Properties Viewing the Source for a Line Breakpoint Enabling or Disabling a Breakpoint Deleting a Breakpoint Breakpoints Window |