Table of Contents
A breakpoint is an interrupter of the debugging process. Set the breakpoint next to the string that you want to explore in more detail, and the Debugger will stop the execution at this point. This gives you the ability to see the actual state of code variables, look at the call stack, and find the reason of an issue.
Types of breakpoints
In the Debug Mode, you are faced with different types of breakpoints. Hover the cursor over the breakpoint to see information about it.
- Enabled breakpoint — the red dot in the editor's left margin. It stops the debugging before the execution of this string.
- Disabled breakpoint — the white dot in the editor's left margin. It is skipped during the execution of the Debugger.
- Invalid breakpoint — the white dot with an exclamation mark in the editor's left margin. It is invalid in the current location. This may happen if the breakpoint, for instance, is set in another test method, or at this string there is no information for the debugging.
All the breakpoints are available in the Breakpoints panel.
You have the ability to set the breakpoints before debugging as well as when you are already running the Debugger. You can do this in three ways:
- click on the editor's left margin next to the line, where you want to stop the debugging,
- place the cursor at the necessary line and press the F9 hotkey,
- use the Call stack panel — right-click on the calling function and select
Breakpoint ⇒ Insert Breakpoint.
Enabling / Disabling breakpoints
The ability to enable or disable the breakpoints helps you to be able to flexibly manage them. You can disable a breakpoint that you don't need to hit in the current execution but you still wish to leave it visible to have the ability to back to it later. You can do this by:
- unchecking the box next to breakpoint in the Breakpoints panel,
- using the context menu of the breakpoint,
- pressing the Ctrl+F9 hotkey, when the cursor is placed on the line with the breakpoint.
In addition, you can disable all the breakpoints with a few clicks: go to the
Main Menu ⇒ Debug ⇒ Disable All Breakpoints.
To enable the breakpoint, click on it one more time. You also can enable the breakpoint from its context menu.
In addition, you can enable all the breakpoints also from the Main Menu.
When you don't need the breakpoint and don't want to interrupt the debugging process at this step, you can easily delete this breakpoint:
- click on the breakpoint in the editor's left margin, or
- select Delete breakpoint from its context menu.
You can also delete all the breakpoints: select Delete All Breakpoints from the Debug menu item, or use the Ctrl+Shift+F9 hotkey.
In addition, you can delete selected breakpoints from the Breakpoints panel: select the necessary one and click on the Delete button (or use the Alt+F9, D hotkey).
Export / Import the breakpoints
If you need to save a set of the breakpoints with their data for sharing with colleagues, or for exploring them later, use the Export function. Right-click on any breakpoint and select Export from the context menu.
All the data about the breakpoints will be saved as a XML file.
To import such a file to the IDE, use the Import function.
Click this button at the top of the Breakpoints panel and select the file that you need in the opened window.
In this section:
This also may be useful: