# Step through

CLion provides a set of stepping actions for various debugging strategies (for example, whether you need to go directly to the next line or enter the functions called on your way there).

> **Tip:**
> To avoid cluttering the editor with many tabs during stepping, enable the [preview tab](using-code-editor.html#preview-tab). It allows you to view files in a single tab one by one without opening each file in a new tab.

Stepping actions are located on the Debugger window toolbar and in the ![](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.general.moreVertical.svg) menu:

![Stepping actions](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugSteppingToolbar_newUI.png)

## Step over

Steps over the current line and takes you to the next line even if the current line includes function calls. The calls are skipped, and you move straight to the next line of the caller.

Procedure:

* Click the Step Over button ![Step Over button](https://resources.jetbrains.com/help/img/idea/2026.2/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)), `F6` (Xcode), `F10` (Visual Studio), `F10` (Visual Studio (macOS)), `F10` (ReSharper), `F10` (ReSharper (macOS)), `F10` (QtCreator), `⌘ ⇧ O` (QtCreator (macOS)), `F8` (NetBeans), `F6` (Eclipse), `F6` (Eclipse (macOS)).

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).

## Step into

Steps inside the code of a called function.

Procedure:

* Click the Step Into button ![Step Into button](https://resources.jetbrains.com/help/img/idea/2026.2/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)), `F7` (Xcode), `F11` (Visual Studio), `⌘ F11` (Visual Studio (macOS)), `F11` (ReSharper), `⌘ F11` (ReSharper (macOS)), `F11` (QtCreator), `⌘ ⇧ I` (QtCreator (macOS)), `F7` (NetBeans), `F5` (Eclipse), `F5` (Eclipse (macOS)).

Some methods  are skipped by Step into as you normally might not need to debug them. This list can be fine-tuned on the `Build, Execution, Deployment | Debugger | Stepping` page   of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

## 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.

> **Warning:**
> This feature is not applicable to C/C++ debugging. However, you can use it for other languages like JavaScript and Python.

Procedure:

1. Select Smart Step Into from the ![](https://resources.jetbrains.com/help/img/idea/2026.2/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)), `⌥ ⇧ F7` (Xcode), `Shift+F7` (Visual Studio), `⇧ F7` (Visual Studio (macOS)), `Shift+F7` (ReSharper), `⇧ F7` (ReSharper (macOS)), `Shift+F7` (QtCreator), `⇧ F7` (QtCreator (macOS)), `Shift+F7` (NetBeans), `Ctrl+F5` (Eclipse), `⌥ F5` (Eclipse (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)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (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)), `F7` (Xcode), `F11` (Visual Studio), `⌘ F11` (Visual Studio (macOS)), `F11` (ReSharper), `⌘ F11` (ReSharper (macOS)), `F11` (QtCreator), `⌘ ⇧ I` (QtCreator (macOS)), `F7` (NetBeans), `F5` (Eclipse), `F5` (Eclipse (macOS)).

You can configure Smart Step Into to be used instead of the regular Step Into every time there are multiple method calls on the line. This is done in `Settings | Build, Execution, Deployment | Debugger | Stepping`.

## Step out

Steps out of the current function and takes you to the code of the caller.

Procedure:

* Click the Step Out button ![Step Out button](https://resources.jetbrains.com/help/img/idea/2026.2/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)), `F8` (Xcode), `Shift+F11` (Visual Studio), `⇧ F11` (Visual Studio (macOS)), `Shift+F11` (ReSharper), `⇧ F11` (ReSharper (macOS)), `Shift+F11` (QtCreator), `⌘ ⇧ T` (QtCreator (macOS)), `Ctrl+F7` (NetBeans), `F7` (Eclipse), `F7` (Eclipse (macOS)).

If the function you step out of has a non-void return type, the returned value is shown in the Variables pane:

![Showing function's return value after Step Out](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugger_stepout_returnvalue.png)

## 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.2/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)), `⌘ ⌃ C` (Xcode), `Ctrl+F10` (Visual Studio), `⌘ F10` (Visual Studio (macOS)), `Ctrl+F10` (ReSharper), `⌘ F10` (ReSharper (macOS)), `Ctrl+F10` (QtCreator), `⇧ F8` (QtCreator (macOS)), `F4` (NetBeans), `Ctrl+R` (Eclipse), `⌘ R` (Eclipse (macOS)).

Also,  you can Run to Cursor by  hovering over the line and clicking the Run to Cursor icon.

![Run to cursor in a single click](https://resources.jetbrains.com/help/img/idea/2026.2/cl_runtocursor_inlayhint.png)

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 step into

Steps into the function even if it is [skipped](#configuring-skipped-list) by the regular Step Into by default.

Procedure:

* Select Force Step Into from the ![](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.general.moreVertical.svg) menu or press `Alt+Shift+F7` (Windows), `⌥ ⇧ F7` (macOS), `⌥ ⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ ;` (macOS System Shortcuts), `Alt+Shift+F7` (XWin), `Alt+Shift+F7` (GNOME), `Alt+Shift+F7` (KDE), `Alt+Shift+F7` (Emacs), `Alt+Shift+F7` (Sublime Text), `⌥ ⇧ F7` (Sublime Text (macOS)), `⌃ ⌥ F7` (Xcode), `Alt+F11` (Visual Studio), `⌥ F11` (Visual Studio (macOS)), `Alt+F11` (ReSharper), `⌥ F11` (ReSharper (macOS)), `Alt+Shift+F7` (QtCreator), `⌥ ⇧ F7` (QtCreator (macOS)), `Alt+Shift+F7` (NetBeans), `Alt+Shift+F7` (Eclipse), `⌘ ⌃ F5` (Eclipse (macOS)).

In case the source code of the function that you want to step into is unavailable, you can [debug disassembled code](disassembly-view.html)  in a dedicated view.

```JAVA
static void count(int to) {
    for (int i = 0; i < to; i++) {
        // the program is suspended here
            System.out.println(i);
        }
    System.out.println("Complete!");
}
```

```JAVA
public void println(String x) {
    // Force Step Into enters the implementation of PrintStream.println()
    if (getClass() == PrintStream.class) {
        writeln(String.valueOf(x));
    } else {
        synchronized (this) {
            print(x);
            newLine();
        }
    }
}
```

## 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.2/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` (Xcode), `Ctrl+Alt+F9` (Visual Studio), `⌘ ⌥ F9` (Visual Studio (macOS)), `Ctrl+Alt+F9` (ReSharper), `⌘ ⌥ F9` (ReSharper (macOS)), `Ctrl+Alt+F9` (QtCreator), `⌘ ⌥ F9` (QtCreator (macOS)), `Ctrl+Alt+F9` (NetBeans), `Ctrl+Alt+F9` (Eclipse), `⌘ ⌥ F9` (Eclipse (macOS)).

## Force step over

[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.

Procedure:

* Select Force Step Over from the ![](https://resources.jetbrains.com/help/img/idea/2026.2/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)), `⌃ ⌥ F6` (Xcode), `Alt+Shift+F8` (Visual Studio), `⌥ ⇧ F8` (Visual Studio (macOS)), `Alt+Shift+F8` (ReSharper), `⌥ ⇧ F8` (ReSharper (macOS)), `Alt+Shift+F8` (QtCreator), `⌥ ⇧ F8` (QtCreator (macOS)), `Alt+Shift+F8` (NetBeans), `Alt+Shift+F8` (Eclipse), `⌘ ⌃ F6` (Eclipse (macOS)).

## Reversible debugging

Although reversible debugging is not supported in CLion out-of-the-box, you can set it up on Linux using the [Undo plugin](https://plugins.jetbrains.com/plugin/8620-undo-reversible-debugging-integration).

The plugin integrates the [Undo](https://undo.io/) ’s record, rewind and replay technology in CLion. With Undo, you can record the program’s execution down to single instruction for further replay and analysis. This way, the debugger gets reversible: you can step forwards and backwards in your code and see exactly what is happening.

Read this [blog post](https://blog.jetbrains.com/clion/2016/09/undo-for-clion/) and watch this [webinar recording](https://www.youtube.com/watch?t=21m50s&v=2R3OSGmUmoU) for more information.

## See also

### Procedures

[Debug](debugging-code.html)  [Start/Pause/Stop a Debug Session](starting-the-debugger-session.html)

### Reference

[Debug Tool Window](debug-tool-window.html) [Step filter](step-filter.html)

### External Links

[Webinar Recording: CLion Ask Me Anything Session: Debugger](https://www.youtube.com/watch?v=Kz5NQiji9YU5&t=244s) [CLion Debugging Beyond the Basics - Part 2 - Dynamic](https://blog.jetbrains.com/clion/2021/03/clion-debugging-beyond-the-basics-part-2-dynamic) [Video playlist: CLion Debugger](https://www.youtube.com/playlist?list=PLQ176FUIyIUawCufBKmmWkRq2t5sl1xsM)

