# Examine suspended program

After the debugger session has [started](starting-the-debugger-session.html)  , the [Debug](debug-tool-window.html) tool window appears, and the program runs normally until one of the following happens:

* a [breakpoint](using-breakpoints.html) is hit

* you manually [pause](starting-the-debugger-session.html#pause) the program

After that, the program is suspended, allowing you to examine its current state, control its further execution, and test various scenarios at runtime.

> **Tip:**
> If you accidentally closed the Debug tool window, select `View | Tool Windows | Debug` from the main menu or press `Alt+5` (Windows), `⌘ 5` (macOS), `⌘ 5` (IntelliJ IDEA Classic (macOS)), `⌘ 5` (macOS System Shortcuts), `Alt+5` (XWin), `Alt+5` (GNOME), `Alt+5` (KDE), `Alt+5` (Emacs), `Alt+5` (Sublime Text), `⌘ 5` (Sublime Text (macOS)), `⌘ 7` (Xcode), `Alt+5` (Visual Studio), `⌘ 5` (Visual Studio (macOS)), `Alt+5` (ReSharper), `⌘ 5` (ReSharper (macOS)), `Alt+5` (QtCreator), `⌘ 5` (QtCreator (macOS)), `Alt+5` (NetBeans), `Alt+5` (Eclipse), `⌘ 5` (Eclipse (macOS)) to reopen it.

## Frames and threads

The state of the program is represented by frames. When the program is suspended, the current frame stack is displayed in the Frames pane.

![Frames tab of the Debug tool window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_overview_frames.png)

> **Tip:**
> Click ![Hide library frames](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.filter.svg) to hide system/library frames:
>
> ![Hide library frames option](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugtw_hidelibframes.png)

A frame corresponds to an active method or function call. It stores the local variables of the called method or function, its arguments, and the code context that enables expression evaluation.

Each time a Function is called, a new frame is added to the top of the stack. When the execution of a Function is complete, the corresponding frame is removed from the stack (in the last in, first out fashion).

Examining frames helps you understand why particular parameters were passed to a method  and what the state of the caller was at the time of calling.

### Module names

There are cases where the code can be compiled to different modules, like template functions. You can learn in which binary the code is being executed at any moment from module names.

Procedure:

1. Right-click anywhere in the Frames pane and select Show Module Name:

![Frames context options](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugtw_frames_contextoptions.png)

Modules names will be shown for each of the stack frame entries:

![Module names](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugger_modulenames.png)

### Threads

You can navigate through the list of the application threads. The ID given by the OS on thread start can help you identify the thread you are interested in:

![Thread switcher](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugger_threads_switcher.png)

#### Thread Icons

Icons near each thread indicate the status of the thread:

| Icon | Description |
| --- | --- |
|  ![Current thread](https://resources.jetbrains.com/help/img/idea/2026.2/app.debugger.threadCurrent.svg)  | The current thread in suspended state. |
|  ![Suspended thread](https://resources.jetbrains.com/help/img/idea/2026.2/app.debugger.threadSuspended.svg)  | A suspended thread. Threads are marked as suspended when they were paused by the debugger. |

### Free/unfreeze individual threads

In CLion, you can suspend and resume threads while debugging.

Use the context menu in the thread view of the [Debug tool window](debug-tool-window.html) or `Run | Debugging Actions` in the main menu:

![Freeze/unfreeze threads in the context menu](https://resources.jetbrains.com/help/img/idea/2026.2/cl_freeze_threads_contextmenu.png)

* Freeze ... and Unfreeze ... – freezes and unfreezes the currently selected thread.

* Freeze Other Threads – freezes all other threads except the currently selected one and unfreezes the currently selected thread if it was frozen before.

* Unfreeze All Threads – resumes execution in all threads.

> **Note:**
> All four of the freeze/unfreeze actions are available only with LLDB, including MSVC LLDB on Windows.
>
>
>
> For GDB, only Freeze Other Threads and Unfreeze All Threads are working. Furthermore, for GDB, these actions are not supported on Windows and are therefore hidden.

Procedure: Copy stack to clipboard

* To copy the call stack for the current thread, right-click anywhere on the  Frames pane and select Copy Stack.

## Explore and edit variables

The Variables  pane shows the list of the variables in the selected [frame/thread](#examine-frames). Examining the variables can help you understand why the program operates in a certain way.

![Variables pane](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_variablespane.png)

> **Tip:**
> If you encounter `error: summary string parsing error` when viewing a string variable, try adding the `-fno-limit-debug-info` [compiler flag](cmake-profile.html#compiler-flags).

Procedure: View variables in a dedicated dialog

CLion allows you to inspect variables in a dedicated dialog. This is useful when you need to keep track of some variable (or the object whose reference it holds) and at the same time be able to navigate between frames and threads.

* Right-click a variable or a watch and select Inspect.

![Inspect dialog](https://resources.jetbrains.com/help/img/idea/2026.2/cl_inspectvariable.png)

Procedure: Set variable values

If you want to test how the program would behave with certain data or change its flow at runtime, you can achieve that by changing the variable values.

1. Select a variable and press `F2` (Windows), `F2` (macOS), `F2` (IntelliJ IDEA Classic (macOS)), `F2` (macOS System Shortcuts), `F2` (XWin), `F2` (GNOME), `F2` (KDE), `F2` (Emacs), `F2` (Sublime Text), `F2` (Sublime Text (macOS)), `F2` (Xcode), `F2` (Visual Studio), `F2` (Visual Studio (macOS)), `F2` (ReSharper), `F2` (ReSharper (macOS)), `F2` (QtCreator), `F2` (QtCreator (macOS)), `F2` (NetBeans), `F2` (Eclipse), `F2` (Eclipse (macOS)). Alternatively, select Set Value from the context menu.

2. Enter the value for the variable and press `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)).

![Enter new value](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugVaiablesSetValue.png)

Alternatively, you can set a variable value using the [inline](#inline-view) hint popup. Click the hint that corresponds to the desired variable, expand the tree if required, and select Set Value:

![Inline hint menu](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_interactive_inline_hint_setvalue.png)  instance="rm"/>

> **Note:**
> Due to a GDB/LLDB limitation, you cannot set value for `std::string` variables.

Procedure: View as array

The View as array action adds a watchpoint that renders a pointer value as array.

1. Select View as Array from the context menu of a pointer variable.

Specify the array size:

![Specifying the size of the array](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugger_viewasarray_size.png)

The array representation of the selected pointer will be added to the list or variables:

![Viewing a pointer as array](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugger_viewasarray_result.png)

Procedure: View OpenCV images

When debugging an application that contains two-dimensional OpenCV arrays of type `cv::Mat`, you can view them as images in a separate debugger dialog.

1. After debugging has started and an OpenCV array has been initialized, click View as image next to the variable in the debugger’s Variables pane:

![Viewing OpenCV variables](https://resources.jetbrains.com/help/img/idea/2026.2/cl_opencv_view_as_image.png)

2. A new dialog opens:

![Viewing the OpenCV image](https://resources.jetbrains.com/help/img/idea/2026.2/cl_opencv_viewer.png)

3. From this dialog, you can change the image’s color format, choose whether or not to reload it after the debugger steps, save it as a .png file, and more.

![Saving the image as a file](https://resources.jetbrains.com/help/img/idea/2026.2/cl_opencv_viewer_save_file.png)

> **Tip:**
> Feel free to share your feedback on the OpenCV image viewer by selecting `Help | Submit Feedback...` from the main CLion menu or by posting to [our issue tracker](https://youtrack.jetbrains.com/issues/CPP). We’ll consider it as we refine and extend the tool’s functionality.

Procedure: View other image types

If you’re working with image types other than `cv::Mat`, you can also view them as images using the OpenCV image viewer. In this case, you have to set an image format manually. Here is an example:

```CPLUSPLUS
                unsigned char bytes[] = {
  0, 0, 0xff, //red
  0, 0xff, 0, //green
  0xff, 0, 0, //blue
  };

unsigned char *ptr = &bytes[0];
```

1. To view this image, right-click the pointer in the Variables pane and select View as Image… from the context menu:

![Viewing another image type](https://resources.jetbrains.com/help/img/idea/2026.2/cl_opencv_viewer_other_types.png)

2. Manually configure the width, height, and other parameters of the image:

![Viewing pixels](https://resources.jetbrains.com/help/img/idea/2026.2/cl_opencv_viewer_pixels.png)

Procedure: Navigate to source code

You can navigate to declarations from the Variables pane.

* To navigate to the code where the variable is declared, right-click the variable and select Jump to Source `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `⌘ ↓` (Xcode), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F4` (ReSharper), `⌘ ↓` (ReSharper (macOS)), `F4` (QtCreator), `F4` (QtCreator (macOS)), `F4` (NetBeans), `F12` (Eclipse), `F3` (Eclipse (macOS)).

* To navigate to the class declaration of the variable type, right-click the variable and select Jump to Type Source `Shift+F4` (Windows), `⇧ F4` (macOS), `⇧ F4` (IntelliJ IDEA Classic (macOS)), `⇧ F4` (macOS System Shortcuts), `Shift+F4` (XWin), `Shift+F4` (GNOME), `Shift+F4` (KDE), `Shift+F4` (Emacs), `Shift+F4` (Sublime Text), `Shift+F4` (Sublime Text (macOS)), `⇧ F4` (Xcode), `Shift+F4` (Visual Studio), `⇧ F4` (Visual Studio (macOS)), `Shift+F4` (ReSharper), `⇧ F4` (ReSharper (macOS)), `Shift+F4` (QtCreator), `⇧ F4` (QtCreator (macOS)), `Shift+F4` (NetBeans), `Shift+F4` (Eclipse), `⇧ F4` (Eclipse (macOS)).

## Evaluate expressions

CLion lets you evaluate expressions during a debugging session to obtain additional details about the program state or test various execution scenarios at runtime.

> **Note:**
> When evaluating expressions, be mindful of variable scope and lifetime. All expressions are evaluated in the context of the current execution point.

This feature only works if the program was suspended after hitting a breakpoint(not  [paused](starting-the-debugger-session.html#pause)  ).

If there are breakpoints inside methods called within the expression, they will be ignored.

### Evaluate a simple expression in the editor

To quickly evaluate an expression, point at it in the editor. Note that function calls cannot be evaluated this way.

Procedure:

1. Point at the expression you want to evaluate. The result of the expression appears in a tooltip.

![Value tooltip](https://resources.jetbrains.com/help/img/idea/2026.2/cl_evalexpr_editor_hover.png)

2. To view child elements of the resulting object, click ![the Expand button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg)  or press `Ctrl+F1` (Windows), `⌘ F1` (macOS), `⌘ F1` (IntelliJ IDEA Classic (macOS)), `⌘ F1` (macOS System Shortcuts), `Ctrl+F1` (XWin), `Ctrl+F1` (GNOME), `Ctrl+1` (KDE), `Ctrl+F1` (Emacs), `Ctrl+F1` (Sublime Text), `⌘ F1` (Sublime Text (macOS)), `⌘ F1` (Xcode), `Ctrl+F1` (Visual Studio), `Ctrl+F1` (Visual Studio (macOS)), `Ctrl+F1` (ReSharper), `Ctrl+F1` (ReSharper (macOS)), `Ctrl+F1` (QtCreator), `⌘ F1` (QtCreator (macOS)), `Ctrl+F1` (NetBeans), `Ctrl+F1` (Eclipse), `⌘ F1` (Eclipse (macOS)).

![Viewing child elements inside the value tooltip](https://resources.jetbrains.com/help/img/idea/2026.2/cl_evalexpr_editor_child.png)

If you find value tooltips distracting, you can increase the delay or disable them altogether. To do this,   in 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))) , go to `Build, Execution, Deployment | Debugger | Data Views` and set the Show value tooltip and Value tooltip delay options according to your preference.

### Evaluate a complex expression in the editor

If you want to evaluate an expression in the code that involves a method call or indicate a specific portion of the expression to evaluate, use the Quick Evaluate Expression option.

Procedure:

* Select the expression and press `Ctrl+Alt+F8` (Windows), `⌘ ⌥ F8` (macOS), `⌘ ⌥ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ F8` (macOS System Shortcuts), `Ctrl+Alt+8` (XWin), `Ctrl+Alt+8` (GNOME), `Ctrl+Alt+8` (KDE), `Ctrl+Alt+F8` (Emacs), `Ctrl+Alt+F8` (Sublime Text), `⌘ ⌥ F8` (Sublime Text (macOS)), `⌘ ⌥ F8` (Xcode), `Ctrl+Alt+F8` (Visual Studio), `⌘ ⌥ F8` (Visual Studio (macOS)), `Ctrl+Alt+F8` (ReSharper), `⌘ ⌥ F8` (ReSharper (macOS)), `Ctrl+Alt+F8` (QtCreator), `⌘ ⌥ F8` (QtCreator (macOS)), `Ctrl+Alt+F8` (NetBeans), `Ctrl+Alt+F8` (Eclipse), `⌘ ⌥ F8` (Eclipse (macOS)) or   select Evaluate Expression from   the floating toolbar that appears  .

![Quick Evaluate Expression](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_quick_evalexpr.png)

* Alternatively, go to `Run | Debugging Actions | Quick Evaluate Expression` or hold `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` (Xcode), `Alt` (Visual Studio), `Alt` (Visual Studio (macOS)), `Alt` (ReSharper), `Alt` (ReSharper (macOS)), `Alt` (QtCreator), `Alt` (QtCreator (macOS)), `Alt` (NetBeans), `Alt` (Eclipse), `Alt` (Eclipse (macOS)) and click the selection  .

You can configure Quick Evaluate Expression to work for a piece of code on just selecting it (without using the menu/shortcut). Use this option carefully, as you can accidentally call methods when it is enabled.

Procedure: Evaluate expressions on selecting code

* Go to `Settings | Build, Execution, Deployment | Debugger | Data Views` and set the Show value tooltip on code selection option.

### Evaluate arbitrary expressions

Evaluating arbitrary expressions is the most flexible evaluating option. It lets you evaluate any custom code as long as it is in the context of the current frame. Using it, you can evaluate declarations,   method calls,    anonymous classes,  lambdas,    loops, and so on.

Procedure:

1. If you want to start with some expression or a variable, which is currently in front of you (for example, in the editor or on the Variables pane), select it.

2. Go to `Run | Debugging Actions | Evaluate Expression` `Alt+F8` (Windows), `⌥ F8` (macOS), `⌥ F8` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ L` (macOS System Shortcuts), `Alt+F8` (XWin), `Alt+Shift+8` (GNOME), `Alt+Shift+8` (KDE), `Alt+F8` (Emacs), `Alt+F8` (Sublime Text), `⌥ F8` (Sublime Text (macOS)), `⌥ F8` (Xcode), `Shift+F9` (Visual Studio), `⇧ F9` (Visual Studio (macOS)), `Shift+F9` (ReSharper), `⇧ F9` (ReSharper (macOS)), `Alt+F8` (QtCreator), `⌥ F8` (QtCreator (macOS)), `Ctrl+F9` (NetBeans), `Ctrl+U` (Eclipse), `⌘ U` (Eclipse (macOS)) or select Evaluate Expression from the context menu. The shortcut may not work on Ubuntu (for correct operation, [adjust the shortcut configuration](configuring-keyboard-and-mouse-shortcuts.html)).

3. In the Evaluate dialog, modify the selected expression or enter a new one in the Expression field. Click Expand `Shift+Enter` (Windows), `⇧ ⏎` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⇧ ⏎` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⇧ ⏎` (Sublime Text (macOS)), `⇧ ⏎` (Xcode), `Shift+Enter` (Visual Studio), `⇧ ⏎` (Visual Studio (macOS)), `Shift+Enter` (ReSharper), `⇧ ⏎` (ReSharper (macOS)), `Shift+Enter` (QtCreator), `Shift+Enter` (QtCreator (macOS)), `Shift+Enter` (NetBeans), `Ctrl+NumPad -` (Eclipse), `⌘ NumPad -` (Eclipse (macOS)) to modify a multiline code fragment.

> **Note:**
> Keep in mind that any variables declared in the body of the expression go out of scope after the expression has been evaluated.

4. Click Evaluate ( `Ctrl+Enter` (Windows), `⌘ ⏎` (macOS), `⌘ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ ⏎` (macOS System Shortcuts), `Ctrl+Enter` (XWin), `Ctrl+Enter` (GNOME), `Ctrl+Enter` (KDE), `Ctrl+Enter` (Emacs), `Ctrl+Enter` (Sublime Text), `⌘ ⏎` (Sublime Text (macOS)), `⌘ ⏎` (Xcode), `Ctrl+Enter` (Visual Studio), `⌘ ⏎` (Visual Studio (macOS)), `Ctrl+Enter` (ReSharper), `⌘ ⏎` (ReSharper (macOS)), `Ctrl+Enter` (QtCreator), `Ctrl+Enter` (QtCreator (macOS)), `Ctrl+Enter` (NetBeans), `Ctrl+Enter` (Eclipse), `⌘ ⏎` (Eclipse (macOS)) for multiline mode). The expression result appears in the Result field.

![Evaluate expression dialog](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_evalexpr.png)

The result of the expression is taken from the return statement. When there is no return statement, the result is taken from the last line of code (it does not even have to be an expression: a single literal works too). When there is no valid line to take the value from, the result is `undefined`. If the specified expression cannot be evaluated, the Result field indicates the reason.

The Evaluate dialog is non-modal, so you can switch the focus back to the editor to copy other variables and expressions. You can also open multiple Evaluate dialogs.

## View values inline

CLion shows the values of the variables right next to their usage. Once the variable value has changed, the inline view is updated with the new value and changes its color.

You can click an inline hint and expand it to examine the fields belonging to the variable. From this popup, you can also [change the variable values](#setting-variable-values) and [add inline watches](#inline-watch).

![Inline variables view](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debugger_inline_view.animated.gif)

The inline view is enabled by default. To turn it off,   in 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))) , go to `Build, Execution, Deployment | Debugger | Data Views` and disable the Show values inline option.

Procedure: Add an Inline Watch

If you want the result of some expression to appear on a particular line, you can set up an inline [watch](#watches) for that. Inline watches are persistent and remain active after session restart.

1. Click the inline hint referring to the object whose field you want to track.

2. In the popup, select the field and click Add as Inline Watch.

![Adding an inline watch option](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_interactive_inline_hint_addwatch.png)

3. Fine-tune the watch if needed. You can use any valid expression as a watch.

![Setting an inline watch](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_inline_watch.png)

4. Press `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)) and the inline watch will appear on the same line:

![Inline watch](https://resources.jetbrains.com/help/img/idea/2026.2/cl_inlinewatch_appears.png)

Inline watches you set in the editor are also shown under Inline Watches in the Variables pane  of the Debug tool window:

![Inline watch in the editor and in the Debug tool window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_inline_watch_view.png)

To remove an inline watch, hover over the watch and click the cross near it.

## Watches

> **Tip:**
> If you are looking for information on field watchpoints, refer to the [Breakpoints](using-breakpoints.html) topic.
>
>
>
> If you need to monitor global variables in real time, refer to the [Live watches](live-watches.html) topic.

If you want to keep track of some variable or the result of a more complex expression, set up a watch for this variable or expression. This is useful when you need to evaluate something that is not regularly displayed on the list of variables, or to pin some instance variable thus eliminating the need to expand the tree after each [step](stepping-through-the-program.html).

This feature only works if the program was suspended after hitting a breakpoint(not  [paused](starting-the-debugger-session.html#pause)  ).

Watches are evaluated in the context of the selected frame. Watches cannot be evaluated when they are out of context or when they fail to compile. If this is the case, the watch is marked with the error icon ![Error icon](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.status.error.svg).

By default, watches are shown together with variables in the Variables pane. To hide/reveal the Watches pane, use the Separate watches option in the Layout Settings![the Restore Layout button](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.general.layout.svg)  menu.

Procedure: Add a watch

* Enter the expression in the top part of the Variables pane, then click Add to Watches.

![The expression in the Variables tab](https://resources.jetbrains.com/help/img/idea/2026.2/add-watch-from-variables.png)

> **Tip:**
> If the variable or expression that you want to track is already in front of you (for example, in the code editor), you can select and drag it to the Variables pane. For variables in the current context, you can also right-click them in the Variables pane and select Add to Watches from the context menu.

After you have added a variable/expression to Watches, it stays there and is evaluated for each [step](stepping-through-the-program.html), providing you with the result in the current context.

Procedure: Edit a watch

* Right-click the desired watch and select Edit.

Procedure: Delete a watch

* To remove a single watch, right-click it and select Remove Watch. Alternatively, select the watch and 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)), `⌦` (Xcode), `Delete` (Visual Studio), `⌦` (Visual Studio (macOS)), `Delete` (ReSharper), `⌦` (ReSharper (macOS)), `Delete` (QtCreator), `⌦` (QtCreator (macOS)), `Delete` (NetBeans), `Delete` (Eclipse), `⌦` (Eclipse (macOS)) on the Variables/

Watches pane.

* To remove all watches, right-click anywhere on the Variables/

Watches pane and select Remove All Watches.

Watches allow for the same actions as variables do. For example, you can [view them in a dedicated dialog](#view-in-a-dialog) or use them to [navigate to the source code](#navigate-to-source).

Watches are a part of your project. This means you can stop and rerun the debugging session without risk of losing them.

## Execution point

### Return to the current execution point

Examining the program state involves navigating in code, and you often need to return to the place where your program is suspended.

Procedure:

Do one of the following:

* In the main menu, go to `Run | Debugging Actions | Show Execution Point`.

* Press `Alt+F10` (Windows), `⌥ F10` (macOS), `⌥ F10` (IntelliJ IDEA Classic (macOS)), `⌥ F10` (macOS System Shortcuts), `Alt+F10` (XWin), `Alt+Shift+0` (GNOME), `Alt+Shift+0` (KDE), `Alt+F10` (Emacs), `Alt+F10` (Sublime Text), `⌥ F10` (Sublime Text (macOS)), `⌥ F10` (Xcode), `Alt+NumPad *` (Visual Studio), `⌥ NumPad *` (Visual Studio (macOS)), `Alt+NumPad *` (ReSharper), `⌥ NumPad *` (ReSharper (macOS)), `Alt+F10` (QtCreator), `⌥ F10` (QtCreator (macOS)), `Alt+F10` (NetBeans), `Alt+F10` (Eclipse), `⌥ F10` (Eclipse (macOS)).

* Click ![The More button](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.general.moreVertical.svg) on the stepping toolbar of the Debug tool window and select ![The Show Execution Point button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.showCurrentFrame.svg) Show Execution Point from the context menu that opens.

The current execution point is indicated with a blue line. The code at this line has not been executed yet.

![Blue line indicating the current execution point](https://resources.jetbrains.com/help/img/idea/2026.2/cl_debug_exepoint.png)

## See also

### Procedures

[Debug](debugging-code.html)

### Reference

[Debug tool window](debug-tool-window.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 1 - Suspended](https://blog.jetbrains.com/clion/2021/03/clion-debugging-beyond-the-basics-part-1-suspended) [Video playlist: CLion Debugger](https://www.youtube.com/playlist?list=PLQ176FUIyIUawCufBKmmWkRq2t5sl1xsM)

