Breakpoints
Breakpoints are special markers that suspend program execution at a specific point. This lets you examine the program state and behavior.
Once set, a breakpoint remains in your project until you remove it explicitly.
Set breakpoints
Set a new breakpoint
Click the gutter at the executable line of code where you want to set the breakpoint. Alternatively, place the caret at the line and press Control+F8.
Manage breakpoints
Remove breakpoints
Click the breakpoint in the gutter.
To avoid accidentally removing a breakpoint, you can choose to remove breakpoints by dragging them to the editor or clicking the middle mouse button. To do this, go to Drag to the editor or click with middle mouse button. Clicking a breakpoint will then enable or disable it.
and selectMute breakpoints
If you don't need to stop at your breakpoints for some time, you can mute them. This allows you to resume normal program operation without leaving the debugger session. After that, you can unmute breakpoints and continue debugging.
Click the Mute Breakpoints button in the toolbar of the Debug tool window.
Enable/disable breakpoints
When you remove a breakpoint, its internal configuration is lost. To temporarily turn an individual breakpoint off without losing its parameters, you can disable it:
For non-exception breakpoints: right-click it and set the Enabled option as required. You can also toggle them with the middle mouse button if removing breakpoints is not assigned to it.
For all breakpoints: click View Breakpoints Control+Shift+F8 and check/uncheck the breakpoint on the list.
Move/copy breakpoints
To move a breakpoint, drag it to another line.
To copy a breakpoint, hold Control and drag a breakpoint to another line. This creates a breakpoint with the same parameters at the destination.
Productivity tips
- Add breakpoint descriptions
If you have many breakpoints in your project, you can add descriptions to breakpoints for ease of search. To do this, right-click a breakpoint in the Breakpoints dialog Control+Shift+F8 and select Edit description from the menu. Now when you start typing the breakpoint name, it gets the focus.
- Group breakpoints
You can organize breakpoints into groups, for example, if you need to mark out breakpoints for a specific problem. To do this, in the Breakpoints dialog Control+Shift+F8, select a breakpoint you want to place in a group and select from the menu.