Breakpoints
Breakpoints are special markers that suspend program execution at a specific point. This lets you examine the program state and behavior.
Types of breakpoints
The following types of breakpoints are available in JetBrains Fleet:
Line breakpoints: suspend the program upon reaching the line of code where the breakpoint was set. This type of breakpoints can be set on any executable line of code.
Exception breakpoints: suspend the program when
Throwable
or its subclasses are thrown. They apply globally to the exception condition and do not require a particular source code reference.
Set breakpoints
Set line breakpoints
Click the gutter at the executable line of code where you want to set the breakpoint.
A red circle in the gutter means that the breakpoint is active, and the application will suspend upon hitting it.
If a breakpoint is marked with a grey circle, it means that the breakpoint is inactive. This may happen when:
The corresponding lines are not executable code (for example, comments or blank lines)
The Smart Mode is off
The breakpoint is disabled
Set exception breakpoints
Press ⌘ ⇧ K and start typing
Breakpoints
. Select Breakpoints.Click the Add icon under Exception Breakoints
Enter the name of the exception, on which you want to suspend the application, or select it from the suggestion list. The exception suggestions only appear when the Smart mode is on.
Manage breakpoints
You can review and manage the breakpoints in the workspace in the Breakpoints tool.
Open Breakpoints tool
Press ⌘ ⇧ K and start typing
Breakpoints
. Select Breakpoints.
Disable breakpoints
In the Breakpoints tool, click the checkbox against the breakpoint you want to disable.
It then stays in the project for future use, however it will not suspend the application when hit.
Remove breakpoints
In the Breakpoints tool, right-click the breakpoint you want to remove, then select Delete breakpoint. Alternatively, select the breakpoint and press Backspace
This permanently removes the breakpoint from the workspace.