# Breakpoints

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

Breakpoints are special markers that suspend program execution at a specific point. This lets you [examine the program state](examining-suspended-program.html) and [step through it](stepping-through-the-program.html).  You can add [conditions](#breakpoint_condition) to breakpoints or use them to [log values](#log) without stopping the program.

Once set, a breakpoint remains in your project until you remove it explicitly, except for [temporary breakpoints](#remove_once_hit).

> **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 GoLand must be running when such changes are made, otherwise they will pass unnoticed.

## Types of breakpoints

The following types of breakpoints are available in GoLand:

* 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 an unrecovered panic or a fatal runtime error occurs. The Go error breakpoint is enabled by default. On macOS, the debugger stops at these errors even if you disable this breakpoint.

## Set breakpoints

Procedure: Set line breakpoints

* 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 `Ctrl+F8` (Windows), `⌘ F8` (macOS), `⌘ F8` (IntelliJ IDEA Classic (macOS)), `⌃ Quote` (macOS System Shortcuts), `Ctrl+F8` (XWin), `Ctrl+F8` (GNOME), `Ctrl+8` (KDE), `Ctrl+F8` (Emacs), `Ctrl+F8` (Sublime Text), `⌘ F8` (Sublime Text (macOS)), `F9` (VSCode), `F9` (VSCode (macOS)).

![Debug a line breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/go_debug_line_breakpoint.png)

Procedure: Set conditional and logging breakpoints

To set a breakpoint that only suspends the application when a condition is met (conditional breakpoint) or logs a message (logging breakpoint or logpoint):

1. Right-click  the line or declaration where you want to set the breakpoint.

2. From the menu that appears, select Add Conditional Breakpoint or Add Logging Breakpoint respectively.

3. In the popup that appears, specify the condition or the expression whose result you want to log.

For more information, refer to [breakpoint conditions](#breakpoint_condition) and [logging breakpoints](#log).

Procedure: Set exception breakpoints

1. Press `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)) or select `Run | View Breakpoints` from the main menu.

2. In the Breakpoints dialog, expand Go error breakpoint and select Fatal error. This breakpoint is created and enabled by default. It stops the program on unrecovered panics and fatal runtime errors, not when a function returns an `error` value.

> **Note:**
> On macOS, the debugger stops at unrecovered panics and fatal runtime errors even if you disable this breakpoint.

To configure JavaScript exceptions, select JavaScript Exception Breakpoint.

![A Go program is suspended at runtime.fatalpanic, with the enabled Fatal error breakpoint selected in the Breakpoints dialog.](https://resources.jetbrains.com/help/img/idea/2026.3/go_create_exception_breakpoint.png)

## Manage breakpoints

Procedure: Remove breakpoints

* For non-exception breakpoints: click  the breakpoint in the gutter.

* For all breakpoints:   go to `Run | View Breakpoints` `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)) in the main menu, select the breakpoint, and click  Remove or press `Delete` (Windows), `⌦` (macOS), `⌦` (IntelliJ IDEA Classic (macOS)), `⌦` (macOS System Shortcuts), `Delete` (XWin), `Delete` (GNOME), `Delete` (KDE), `Delete` (Emacs), `Delete` (Sublime Text), `⌦` (Sublime Text (macOS)), `Delete` (VSCode), `⌦` (VSCode (macOS)).

To avoid accidentally removing a breakpoint and losing its parameters, 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 the middle mouse button. Clicking a breakpoint will then [enable or disable](#disable) it.

Procedure: Mute 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 ![Mute Breakpoints button](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.muteBreakpoints.svg) in the toolbar of the Debug tool window.

Procedure: Enable/disable breakpoints

When you remove a breakpoint, its [internal configuration](#breakpoint-properties) 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. Alternatively, you can do this by clicking a breakpoint while holding `Alt` (Windows), `Alt` (macOS), `Alt` (IntelliJ IDEA Classic (macOS)), `Alt` (macOS System Shortcuts), `Alt` (XWin), `Alt` (GNOME), `Alt` (KDE), `Alt` (Emacs), `Alt` (Sublime Text), `Alt` (Sublime Text (macOS)), `Alt` (VSCode), `Alt` (VSCode (macOS)) or clicking it with the middle mouse button. For the middle mouse button, check that removing breakpoints is not [assigned to it](#remove).

* For all breakpoints: click Run | View Breakpoints `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)) and check/uncheck the breakpoint on the list.

Procedure: Move/copy breakpoints

* To move a breakpoint, drag it to another line.

* To copy a breakpoint, hold `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (VSCode), `Ctrl` (VSCode (macOS)) and drag a breakpoint to another line. This creates a breakpoint with the same parameters at the destination.

Procedure: View all set breakpoints

You can view the list of all breakpoints in the [Bookmarks](bookmarks.html) 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.

![Bookmarks tool window](https://resources.jetbrains.com/help/img/idea/2026.3/go_bookmarks_tool_window.png)

Procedure: Group breakpoints

You can organize breakpoints into groups, for example, if you need to mark out breakpoints for a specific problem.

* In the Breakpoints dialog `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+F8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)), select a breakpoint you want to place in a group and select `Move to group` from the menu.

## Configure breakpoints' properties

Depending on the breakpoint type, you can configure additional properties which allow you to tailor its operation for specific needs. The most used options are available via [intentions](#intentions).

Procedure:

* To access breakpoint intentions, place the caret at the line with the breakpoint and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)). Use this option when you need to quickly configure basic breakpoint properties.

* To access the full list of properties, right-click the breakpoint and click More or press `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)).

### Intentions reference

| Intention | Description |
| --- | --- |
|  Remove breakpoint  |  [Removes](#remove) the breakpoint at the selected line.  |
|  Disable Breakpoint  |  [Disables](#disable) the breakpoint at the selected line.  |
|  Edit Breakpoint  |  Opens a dialog with the most used breakpoint [properties](#properties). For more properties, click More or press `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)).  |

### Breakpoints' properties reference

In this chapter, you can find information on the features available for breakpoints.

#### Enabled

Clear the checkbox to temporarily disable a breakpoint without removing it from the project. Disabled breakpoints are skipped during [stepping](stepping-through-the-program.html).

You can configure GoLand to enable/disable breakpoints on clicking rather than removing them altogether. To do this, go to `Settings | Build, Execution, Deployment | Debugger` and set the Remove breakpoint option to Drag to the editor or click with middle mouse button.

#### Suspend

Specifies whether to pause the program execution when the breakpoint is hit.

Non-suspending breakpoints are useful when you need to log some expression without pausing the program (for example, when you need to know how many times a method was called) or if you need to create a trigger breakpoint that will enable [dependent breakpoints](#disable-until-hit) when hit.

#### Condition

This option is used to specify a condition that is checked each time the breakpoint is hit.  If the condition evaluates to `true` , the selected actions are performed. Otherwise, the breakpoint is ignored.

> **Note:**
> The condition must be valid at the line where the breakpoint is set.

Use a Boolean expression, such as `count > 10`. The debugger stops when the condition evaluates to `true`.

When evaluating expressions, make sure you are aware of their possible side effects as they may potentially affect the behavior and the result of the program.

#### Logging options

When a breakpoint is hit, the following can be logged to the console:

* "Breakpoint hit" message: a log message like `Breakpoint reached`.

* Stack trace: the stack trace for the current frame. This is useful if you want to check what paths have led to this point without interrupting the program execution.

* Evaluate and log: the result of an arbitrary expression, for example, `"Initializing"` or `len(users)`. For example, enter `len(users)` to log the number of users each time execution reaches the breakpoint. When evaluating expressions, make sure you are aware of their possible side effects as they may potentially affect the behavior and the result of the program.

Procedure: Set a logging breakpoint

1. (optional) If the expression that you want to log is in front of you in the editor, select	it.

2. Hold `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (VSCode), `Shift` (VSCode (macOS)) and click the gutter.

#### Remove once hit

Specifies whether the breakpoint should be removed from the project after it has been hit once.

#### Disable until hitting the following breakpoint

When a breakpoint is selected in the Disable until hitting the following breakpoint box, it acts as a trigger for the current breakpoint. This [disables](#enabled) the current breakpoint until the specified breakpoint has been hit.

You can also choose whether to disable it again after this has happened or leave it enabled.

This option is useful when you only need to suspend the program under certain conditions or after certain actions. In this case, the trigger breakpoint usually isn't required to stop the program execution and is made [non-suspending](#suspend_policy).

## Breakpoint statuses

Breakpoints can have the following statuses:

|  Status  |  Description  |
| --- | --- |
|  Invalid  |  If it is technically impossible to suspend the program at the breakpoint, the debugger marks it as invalid. This often happens because there is no executable code on the line.  |
|  Muted  |  All breakpoints are temporarily inactive because they have been [muted](#mute).  |
|  Disabled  |  This breakpoint is temporarily inactive because it has been [disabled](#disable).  |
|  Non-suspending  |  The [suspend policy](#suspend_policy) is set for this breakpoint so that it does not suspend the execution when hit.  |

## Breakpoint icons

Depending on their [type](#breakpoint-types) and [status](#breakpoint-statuses), breakpoints are marked with the following icons:

|  | Line | Exception |
| --- | --- | --- |
|  Regular  |  ![line breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_set_breakpoint.svg)  |  ![exception breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_exception_breakpoint.svg)  |
|  Disabled  |  ![disabled line breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_disabled_breakpoint.svg) |  ![disabled exception breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_disabled_exception_breakpoint.svg)  |
|  Muted  |  ![muted line breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_muted_breakpoint.svg)  |   |
|  Muted disabled  |  ![muted disabled line breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_muted_disabled_breakpoint.svg)  |  |
|  Non-suspending  |  ![non-suspending line breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_no_suspend_breakpoint.svg)  |  |
|  Invalid  |  ![invalid breakpoint](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.db_invalid_breakpoint.svg)  |

> **Note:**
> The provided icons correspond to the standard IDE themes. Custom themes may use different icons.

## Productivity tips

Use breakpoints for debug printing
: Use [non-suspending](#suspend_policy) [logging](#log) breakpoints instead of inserting print statements in your code. This provides a more flexible and centralized way of handling debug log messages.

Set logging breakpoints more quickly
: To set a [non-suspending](#suspend_policy) [logging](#log) breakpoint, hold `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (VSCode), `Shift` (VSCode (macOS)) and click the gutter. This will not suspend the program execution and instead log a message like   `Breakpoint reached` . If you want to log some expression that is in front of you in the editor, select it before holding `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (VSCode), `Shift` (VSCode (macOS)) and clicking the gutter.

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 `Ctrl+Shift+F8` (Windows), `⌘ ⇧ F8` (macOS), `⌘ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F8` (macOS System Shortcuts), `Ctrl+Shift+F8` (XWin), `Ctrl+Shift+F8` (GNOME), `Ctrl+Shift+8` (KDE), `Ctrl+Shift+F8` (Emacs), `Ctrl+Shift+F8` (Sublime Text), `⌘ ⇧ F8` (Sublime Text (macOS)), `Ctrl+Shift+F8` (VSCode), `⌘ ⇧ F8` (VSCode (macOS)) and select Edit description from the menu. Now when you start typing the breakpoint name, it gets the focus.

