# Interactive Groovy console

`Tools | Groovy Console`

Interactive Groovy console can be launched in any project.

Note that if dependencies in your project contain a Groovy library, then the specified Groovy library will be used to launch the Groovy console. If the dependencies do not contain a Groovy library, then the bundled Groovy library of the Groovy version 2.3.9 will be used.

## Editor for Groovy Console

Use the editor for the interactive Groovy console to write and evaluate your code.

| Item | Description |
| --- | --- |
| ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.gutter.run.svg)  | Click this icon to run the editor code in the Groovy console. You can view the results in the run tool window for Groovy console. |
| ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.nodes.module.svg) | Click this icon to see the module in which the Groovy console was launched. It might be helpful for multi-module projects. |

## Run Tool Window for Groovy Console

Use this tool window to view the results of the Groovy console execution.

| Item | Tooltip and Shortcut | Description |
| --- | --- | --- |
|  ![the Stop button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.run.stop.svg)  |    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)), `Shift+F5` (NetBeans), `Shift+F5` (Visual Studio), `⇧ F5` (Visual Studio (macOS)), `Ctrl+F2` (Eclipse), `⌘ F2` (Eclipse (macOS))  |    Click this button to stop the current process.       Clicking the button once invokes soft kill allowing the application to catch the `SIGINT` event and perform graceful termination (on Windows, the `Ctrl+C` event is emulated). After the button is clicked once, it is replaced with ![the Kill Process button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.debugger.killProcess.svg) indicating that subsequent click will lead to force termination of the application, for example on Unix `SIGKILL` is sent.                   |
|  ![the Close button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.closeSmall.svg)  |    Close   `Ctrl+Shift+F4` (Windows), `⌃ ⇧ F4` (macOS), `⌘ ⇧ F4` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ F4` (macOS System Shortcuts), `Ctrl+Shift+F4` (XWin), `Ctrl+Shift+F4` (GNOME), `Ctrl+Shift+4` (KDE), `Ctrl+Shift+F4` (Emacs), `Ctrl+Shift+F4` (Sublime Text), `⌃ ⇧ F4` (Sublime Text (macOS)), `Ctrl+Shift+F4` (NetBeans), `Ctrl+Shift+F4` (Visual Studio), `⌃ ⇧ F4` (Visual Studio (macOS)), `Ctrl+W` (Eclipse), `⌘ W` (Eclipse (macOS))  | Click this button to close the selected tab of the Run tool window and terminate the current process.  |
|  ![previous occurrence](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.up.svg) ![next occurrence](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.down.svg)  |    Up/down the Stack Trace   `Ctrl+Alt+Up` (Windows), `⌘ ⌥ ↑` (macOS), `⌘ ⌥ ↑` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ↑` (macOS System Shortcuts), `Ctrl+Alt+Up` (XWin), `Ctrl+Alt+Up` (GNOME), `Ctrl+Alt+Up` (KDE), `Ctrl+Alt+Up` (Emacs), `Ctrl+Alt+Up` (Sublime Text), `⌘ ⌥ ↑` (Sublime Text (macOS)), `Ctrl+Alt+Up` (NetBeans), `Ctrl+Alt+Up` (Visual Studio), `⌘ ⌥ ↑` (Visual Studio (macOS)), `Ctrl+Alt+Up` (Eclipse), `⌘ ⌥ ↑` (Eclipse (macOS))     `Ctrl+Alt+Down` (Windows), `⌘ ⌥ ↓` (macOS), `⌘ ⌥ ↓` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ↓` (macOS System Shortcuts), `Ctrl+Alt+Down` (XWin), `Ctrl+Alt+Down` (GNOME), `Ctrl+Alt+Down` (KDE), `Ctrl+Alt+Down` (Emacs), `Ctrl+Alt+Down` (Sublime Text), `⌘ ⌥ ↓` (Sublime Text (macOS)), `Ctrl+Alt+Down` (NetBeans), `Ctrl+Alt+Down` (Visual Studio), `⌘ ⌥ ↓` (Visual Studio (macOS)), `Ctrl+Alt+Down` (Eclipse), `⌘ ⌥ ↓` (Eclipse (macOS))    | Click this button to navigate up or down in the stack trace and have the caret jump to the corresponding location in the source code.  |
|  ![the Soft-Wrap button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.softWrap.svg)  | Use Soft Wraps | Click this button to toggle the soft wrap mode of the output. |
|  ![Scroll to the end](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.scrollDown.svg)  | Scroll to the end | Click this button to navigate to the bottom of the stack trace and have the caret jump to the corresponding location in the source code.  |
|  ![the Print button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.print.svg)  | Print | Click this button to send the console text to the default printer. |
|  ![Clear all](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.delete.svg)  | Clear All | Click this button to remove all text from the console. This function is also available from the context menu of the console.  |
|  ![the Run button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.toolwindows.toolWindowRun.svg)  | Execute Groovy Code   | Run the code in the console. |

