Breakpoints
Toggle line breakpoint: CtrlF8
Edit breakpoint properties: CtrlShiftF8
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.
note
If a file with breakpoints was modified externally, for example, updated through a VCS or changed in an external editor, and the line numbers have changed, breakpoints will be moved accordingly. Note that DataGrip must be running when such changes are made, otherwise they will pass unnoticed.
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 CtrlF8.
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 Settings | Build, Execution, Deployment | Debugger and select Drag to the editor or click with middle mouse button. Clicking a breakpoint will then enable or disable it.
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.
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 Run | View Breakpoints CtrlShiftF8 and check/uncheck the breakpoint on the list.
To move a breakpoint, drag it to another line.
To copy a breakpoint, hold Ctrl and drag a breakpoint to another line. This creates a breakpoint with the same parameters at the destination.
You can view the list of all breakpoints in the Bookmarks tool window. Breakpoints are automatically added to the dedicated list in the tool window once you place them in your code.
In the main menu, go to View | Tool Windows | Bookmarks and expand the Breakpoints list.
You can organize breakpoints into groups, for example, if you need to mark out breakpoints for a specific problem.
In the Breakpoints dialog CtrlShiftF8, select a breakpoint you want to place in a group and select Move to group from the menu.
- 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 CtrlShiftF8 and select Edit description from the menu. Now when you start typing the breakpoint name, it gets the focus.
Thanks for your feedback!