# Debug

During a debug session, the debugger interferes with your program execution and provides you with the information on what’s happening under the hood. Watch this video to learn the fundamentals of debugging in CLion:

[Video](https://www.youtube.com/v/5wGsRdumueU)

> **Tip:**
> Find more videos in our [CLion Debugger](https://www.youtube.com/playlist?list=PLQ176FUIyIUawCufBKmmWkRq2t5sl1xsM) playlist.

Procedure: General debugging procedure

1. Configure a [debug profile](debug-profiles.html).

2. For a CMake project, select a required [CMake profile](cmake-profile.html).

3. If necessary, create or modify an existing [run/debug configuration](run-debug-configuration.html).

4. Place [breakpoints](using-breakpoints.html) in your code.

5. Click the Debug <configuration_name> button ![Debug](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.startDebugger_dark.svg) or use other options to [start a debug session](starting-the-debugger-session.html#start-debugging).

> **Tip:**
> [Pause or
> resume](starting-the-debugger-session.html#pause) the session as required.

> **Tip:**
> During a debug session, you can [step through the code](stepping-through-the-program.html),  [evaluate expressions](examining-suspended-program.html#evaluating-expressions) , change values on-the-fly
>
> ,   [set watches](examining-suspended-program.html#watches)  and [watchpoints](using-watchpoints.html).

After you've started a debug session, the ![Debug](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.startDebugger.svg) icon that marks the [Debug tool window](debug-tool-window.html) toggles to ![the Active Debugger icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/debug_active.png) to indicate that the debug process is active.

## Useful debugger shortcuts

| Action | Hotkey |
| --- | --- |
| [Toggle breakpoint](using-breakpoints.html#set-line-breakpoint) | `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)), `⌘ \` (Xcode), `F9` (Visual Studio), `F9` (Visual Studio (macOS)), `F9` (ReSharper), `F9` (ReSharper (macOS)), `F9` (QtCreator), `F8` (QtCreator (macOS)), `Ctrl+F8` (NetBeans), `Ctrl+Shift+B` (Eclipse), `⌘ ⇧ B` (Eclipse (macOS)) |
|  [Resume program](starting-the-debugger-session.html#resume)   | `F9` (Windows), `⌘ ⌥ R` (macOS), `F9` (IntelliJ IDEA Classic (macOS)), `⌃ \` (macOS System Shortcuts), `F9` (XWin), `F9` (GNOME), `F9` (KDE), `F9` (Emacs), `F9` (Sublime Text), `F9` (Sublime Text (macOS)), `⌘ ⌃ Y` (Xcode), `F5` (Visual Studio), `F5` (Visual Studio (macOS)), `F5` (ReSharper), `F5` (ReSharper (macOS)), `F5` (QtCreator), `⌘ Y` (QtCreator (macOS)), `F5` (NetBeans), `F8` (Eclipse), `F8` (Eclipse (macOS)) |
|  [Step over](stepping-through-the-program.html#step-over)  | `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)) |
|  [Step into](stepping-through-the-program.html#step-into)  | `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)) |
| Stop | `Ctrl+F2` (Windows), `⌘ F2` (macOS), `⌘ F2` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ .` (macOS System Shortcuts), `Ctrl+F2` (XWin), `Ctrl+F2` (GNOME), `Ctrl+2` (KDE), `Ctrl+F2` (Emacs), `Ctrl+F2` (Sublime Text), `Ctrl+F2` (Sublime Text (macOS)), `⌘ .` (Xcode), `Shift+F5` (Visual Studio), `⇧ F5` (Visual Studio (macOS)), `Shift+F5` (ReSharper), `⇧ F5` (ReSharper (macOS)), `Shift+F5` (QtCreator), `⌘ ⇧ Y` (QtCreator (macOS)), `Shift+F5` (NetBeans), `Ctrl+F2` (Eclipse), `⌘ F2` (Eclipse (macOS)) |
| [View breakpoint details/all breakpoints](using-breakpoints.html#breakpoint-properties) | `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)), `⌘ ⇧ F8` (Xcode), `Alt+F9` (Visual Studio), `⌥ F9` (Visual Studio (macOS)), `Alt+F9` (ReSharper), `⌥ F9` (ReSharper (macOS)), `Ctrl+Shift+F8` (QtCreator), `⌘ ⇧ F8` (QtCreator (macOS)), `Ctrl+Shift+F8` (NetBeans), `Ctrl+Shift+F8` (Eclipse), `⌘ ⇧ F8` (Eclipse (macOS)) |
| Debug code at caret | `Shift+F9` (Windows), `⌃ D` (macOS), `⇧ F9` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ D` (macOS System Shortcuts), `Shift+F9` (XWin), `Shift+F9` (GNOME), `Shift+F9` (KDE), `Shift+F9` (Emacs), `Shift+F9` (Sublime Text), `⌃ D` (Sublime Text (macOS)), `⌘ R` (Xcode), `Alt+F5` (Visual Studio), `⌥ F5` (Visual Studio (macOS)), `Alt+F5` (ReSharper), `⌥ F5` (ReSharper (macOS)), `F5` (QtCreator), `⌘ Y` (QtCreator (macOS)), `Ctrl+F5` (NetBeans), `Alt+Shift+D` (Eclipse), `⌘ F11` (Eclipse (macOS)) (within the `main` method), or `Alt+Shift+F9` (Windows), `⌃ ⌥ D` (macOS), `⌥ ⇧ F9` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ D` (macOS System Shortcuts), `Alt+Shift+F9` (XWin), `Alt+Shift+F9` (GNOME), `Alt+Shift+F9` (KDE), `Alt+Shift+F9` (Emacs), `Alt+Shift+F9` (Sublime Text), `⌃ ⌥ D` (Sublime Text (macOS)), `⌘ ⌥ R` (Xcode), `Alt+Shift+F9` (Visual Studio), `⌃ ⌥ D` (Visual Studio (macOS)), `Alt+Shift+F9` (ReSharper), `⌃ ⌥ D` (ReSharper (macOS)), `Alt+Shift+F9` (QtCreator), `⌃ ⌥ D` (QtCreator (macOS)), `Alt+Shift+F9` (NetBeans), `Alt+Shift+F9` (Eclipse), `⌃ ⌥ D` (Eclipse (macOS))  |

## See also

### Concepts

[Run/Debug Configurations](run-debug-configuration.html) [Breakpoints](using-breakpoints.html) [Debug profiles](debug-profiles.html) [Agentic debugging](agentic-debugging.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) [Video playlist: CLion Debugger](https://www.youtube.com/playlist?list=PLQ176FUIyIUawCufBKmmWkRq2t5sl1xsM) [CLion Debugging - Fundamentals](https://blog.jetbrains.com/clion/2020/10/clion-debugging-part-1-fundamentals) [CLion Debugging Beyond the Basics - Part 1 - Suspended](https://blog.jetbrains.com/clion/2021/03/clion-debugging-beyond-the-basics-part-1-suspended) [CLion Debugging Beyond the Basics - Part 2 - Dynamic](https://blog.jetbrains.com/clion/2021/03/clion-debugging-beyond-the-basics-part-2-dynamic) [CLion Debugging Beyond the Basics - Part 3 - Beyond Local](https://blog.jetbrains.com/clion/2021/05/clion-debugging-beyond-the-basics-part-3-beyond-local)

