Breakpoints
The Breakpoints tab simply lists the currently set breakpoints, showing the class name, and the line number or method on which the breakpoint has been set.
To add a new breakpoint to your code:
- Position the insertion point at the desired line in the Editor window.
- Choose Add/Remove Breakpoint from the Debug menu or toolbar in the Main Window, right-click on the line in the Editor and choose Add/Remove Breakpoint from the contextual menu, or use the keyboard shortcut CTRL+F8.
The current line will be highlighted blue to indicate that the breakpoint has been set.
or
- Choose New Breakpoint from the Debug menu or toolbar to bring up the Add Breakpoint dialog box.
- Choose the type of breakpoint (either exception, method, or line) from the combo box.
- Enter the settings (exception class name, class name and method name, or class name and line number).
![]()
Optional breakpoint settings
If you set the breakpoint using the New Breakpoint command, you have further options:
- If you want to be notified in the Output Window when the breakpoint is reached, check Print text in the Add Breakpoint dialog box. You can also set the text to be printed using a combination of plain text and these self-explanatory substitution codes:
{lineNumber}
,{className}
, and{threadName}
. In addition, you can use curly braces and a dollar sign to create a substitution code for a watch (for example,{$mywatch}
).- If you want to be notified in the Output Window when the breakpoint is reached, check Print text in the Add Breakpoint dialog box. You can also set the text to be printed using a combination of plain text and these self-explanatory substitution codes:
{lineNumber}
,{className}
, and{threadName}
. In addition, you can use curly braces and a dollar sign to create a substitution code for a watch (for example,{$mywatch}
).- Checking Suspend Debugging suspends the debugging session (all threads) when the breakpoint is reached.
You can also set these options (and later change them) in the property sheet for the breakpoint in the Debugger Window.
To remove a breakpoint:
- Position the insertion point on the line in the Editor window where the breakpoint has been set.
- Choose Debug | Add/Remove Breakpoint from the Main Window or use the keyboard shortcut CTRL+F8.
Breakpoints can also be removed directly from the Debugger Window by right-clicking on a listed breakpoint and choosing Delete from the contextual menu or by selecting the breakpoint and pressing DELETE on the keyboard.
Contents | Prev | Next | Index |