# Step through the program

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

Stepping is the process of controlling step-by-step execution of the program.

GoLand provides you with a set of stepping actions. The choice of a particular stepping action depends on your strategy, such as whether you need to go directly to the next line or [inspect](examining-suspended-program.html) the intermediate method calls as well.

The stepping buttons are located on the Debug tool window [toolbar](debug-tool-window.html#Toolbar).

## Step over

> **TL;DR**
> Click the Step Over button ![Step Over button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.stepOver.svg) or press `F8` (Windows), `F8` (macOS), `F8` (IntelliJ IDEA Classic (macOS)), `⌘ Quote` (macOS System Shortcuts), `F8` (XWin), `F8` (GNOME), `F8` (KDE), `F8` (Emacs), `F8` (Sublime Text), `F8` (Sublime Text (macOS)), `F10` (VSCode), `F10` (VSCode (macOS)).

Steps over the current line of code and takes you to the next line even if the highlighted line has method calls in it. The implementation of the methods is skipped, and you move straight to the next line of the caller method.

If there are breakpoints inside the skipped methods, the debugger will stop at them.  To skip any breakpoints on the way, use [Force step over](#force-step-over).

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_debug_examining_step_over_example_2.mp4)

## Step into

> **TL;DR**
> Click the Step Into button ![Step Into button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.stepInto.svg) or press `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ;` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F11` (VSCode), `F11` (VSCode (macOS)).

Step Into enters a called function or method so you can examine its execution.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_debug_examining_step_into_example_1.mp4)

If a line contains several function or method calls, use [Smart Step Into](#smart-step-into) to choose which call to enter.

## Smart step into

Smart step into is helpful when there are several method calls on a line, and you want to be specific about which method to enter. This feature allows you to select the method call you are interested in.

Procedure:

1. Select Smart Step Into from the ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) menu or press `Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ;` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (VSCode), `⇧ F7` (VSCode (macOS)).

2. Click the method. Alternatively, select the method using the arrow keys or the tab key, and then confirm the selection by pressing either `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (VSCode), `⏎` (VSCode (macOS)) or `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ;` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F11` (VSCode), `F11` (VSCode (macOS)).

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_debug_examining_smart_step_into_1.mp4)

## Step out

> **TL;DR**
> Click the Step Out button ![Step Out button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.stepOut.svg) or press `Shift+F8` (Windows), `⇧ F8` (macOS), `⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌘ \` (macOS System Shortcuts), `Shift+F8` (XWin), `Shift+F8` (GNOME), `Shift+F8` (KDE), `Shift+F8` (Emacs), `Shift+F8` (Sublime Text), `⇧ F8` (Sublime Text (macOS)), `Shift+F11` (VSCode), `⇧ F11` (VSCode (macOS)).

Steps out of the current method and takes you to the caller method.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_debug_examining_step_out_example.mp4)

## Run to cursor

Continues the execution until the position of the caret is reached.

Procedure:

1. Place the caret at the line where you want the program to pause.

2. Select Run to Cursor from the ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) menu or press `Alt+F9` (Windows), `⌥ F9` (macOS), `⌥ F9` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ \` (macOS System Shortcuts), `Alt+Shift+9` (XWin), `Alt+Shift+9` (GNOME), `Alt+Shift+9` (KDE), `Alt+F9` (Emacs), `Alt+F9` (Sublime Text), `⌥ F9` (Sublime Text (macOS)), `Alt+F9` (VSCode), `⌥ F9` (VSCode (macOS)).

You can also hover over a line and click the Run to Cursor icon that appears next to it.

If the icon does not appear, open `Settings | Advanced Settings` and select Show inlay Run to Cursor popup in the Debugger section.

![Run to Cursor with a single click](https://resources.jetbrains.com/help/img/idea/2026.3/go_debug_examining_run_to_cursor_mouse.animated.gif)

You can configure whether you want Run to Cursor to work on clicking a line number in `Settings | Build, Execution, Deployment | Debugger`.

To skip any breakpoints on the way, use [Force run to cursor](#force-run-to-cursor).

## Force run to cursor

[Continues the execution](#run-to-cursor) until the position of the caret is reached. All breakpoints on the way are ignored.

Procedure:

1. Place the caret at the line where you want the program to pause.

2. Select Force Run to Cursor from the ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) menu or press `Ctrl+Alt+F9` (Windows), `⌘ ⌥ F9` (macOS), `⌘ ⌥ F9` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ ⇧ \` (macOS System Shortcuts), `Ctrl+Alt+9` (XWin), `Ctrl+Alt+9` (GNOME), `Ctrl+Alt+9` (KDE), `Ctrl+Alt+F9` (Emacs), `Ctrl+Alt+F9` (Sublime Text), `⌘ ⌥ F9` (Sublime Text (macOS)), `Ctrl+Alt+F9` (VSCode), `⌘ ⌥ F9` (VSCode (macOS)).

## Force step over

> **TL;DR**
> Select Force Step Over from the ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) menu or press `Alt+Shift+F8` (Windows), `⌥ ⇧ F8` (macOS), `⌥ ⇧ F8` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ Quote` (macOS System Shortcuts), `Alt+Shift+F8` (XWin), `Alt+Shift+F8` (GNOME), `Alt+Shift+F8` (KDE), `Alt+Shift+F8` (Emacs), `Alt+Shift+F8` (Sublime Text), `⌥ ⇧ F8` (Sublime Text (macOS)), `Alt+Shift+F8` (VSCode), `Alt+Shift+F8` (VSCode (macOS)).

[Steps over](#step-over) the current line of code and takes you to the next line even if the current line has method calls in it. If there are breakpoints in the called methods, they are ignored.

