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 perform actions like examining the value of variables and single-stepping through your program.
The IDE enables you to set several types of breakpoints using the New Breakpoint dialog. You can also set line breakpoints directly in the Source Editor. Breakpoints can be set for the following types of source elements:
The Source Editor indicates a breakpoint by highlighting the line at which the breakpoint is set in red and placing an annotation in the left margin. The following table describes the debugging annotations.
Annotation | Description |
---|---|
![]() | Breakpoint |
![]() | Disabled breakpoint |
![]() | Invalid breakpoint |
![]() | Multiple breakpoints |
![]() | Method or field breakpoint |
![]() | Disabled method or field breakpoint |
![]() | Invalid method or field breakpoint |
![]() | Conditional breakpoint |
![]() | Disabled conditional breakpoint |
![]() | Invalid 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 |
![]() | Suspended threads |
![]() | Thread suspended by hitting a breakpoint |
You can view and organize all IDE breakpoints by choosing Windows > Debugging > Breakpoints (Alt-Shift-5).