The IDE provides several options for setting You can stop execution of your program at a specific line number, method name, exception, class, thread, or variable. For breakpoints set on a variable, method, line, and exception, you can set a condition so that the breakpoint triggers when an expression evaluates to true.
You can set two actions to perform when the breakpoint is hit. You can temporarily stops all threads in the debugging session and print a message in the Output window.You set breakpoints and specify their conditions and actions in the Add Breakpoint dialog box. You open this dialog box from the Debug menu in the main window.
A breakpoint symbol in the left margin of the Source Editor indicates a breakpoint on the adjacent line. The following table describes the breakpoint symbols.
Symbol | Description |
---|---|
![]() | Breakpoint |
![]() | Disabled breakpoint |
![]() | Multiple breakpoints |
![]() | Conditional breakpoint |
![]() | Disabled conditional breakpoint |
![]() | Program counter and one breakpoint |
![]() | Program counter and multiple breakpoints |
You can manage breakpoints from within the Debugger window's Breakpoints view, which lists the currently set breakpoints. You can view or modify the different properties of a breakpoint and view the source of a breakpoint. You can also organize breakpoints into a group so that you can enable, disable, and delete the breakpoints as a single unit.
When you save a program, the IDE saves the state of each breakpoint. The next time you open the program, the breakpoints appear exactly as you set them.
For step-by-step instructions on setting a breakpoint, see:
Setting a Breakpoint on a LineFor instructions on managing breakpoints, see:
Setting a Breakpoint on a Method Name
Setting a Breakpoint on an Exception
Setting a Breakpoint on a Class
Setting a Breakpoint on a Thread
Setting a Breakpoint on a Variable
Viewing the Source for a Line Breakpoint
Modifying Breakpoint Properties
Organizing Breakpoints Into a Group
Disabling and Enabling a Breakpoint
Removing a Breakpoint