JetBrains Fleet 1.42 Help

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 panic() is thrown. They apply globally to the exception condition and do not require a particular source code reference.

On the following screenshot, main.go:8 is a line breakpoint, Go | Fatal error is an exception breakpoint.

Go fleet breakpoints types

Set breakpoints

Set line breakpoints

  • Click the gutter at the executable line of code where you want to set the breakpoint.

    Line breakpoint marked as a red circle in the gutter

    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

  1. Press ⌘ ⇧ K and start typing Breakpoints. Select Breakpoints.

    Searching for breakpoints tool in Goto
  2. Click the Add icon under Exception Breakoints

    Add icon in the Exception Breakpoints section of the Breakpoints tool
  3. 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.

    Searching for breakpoints tool in Goto

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.

Last modified: 11 February 2024