# Run/debug configurations

> **TL;DR**
> Configure: `Run | Edit Configurations`

CLion uses run/debug configurations to run, debug,  and test your code. Each configuration is a named set of startup properties that define what to execute and what parameters and environment should be used.

> **Tip:**
> This article gives a general overview of CLion's run/debug configuration concept. For more information, refer to [CMake Application](run-debug-configuration-application.html), [Native Application](run-debug-configuration-makefile-application.html), [Custom Build Application](custom-build-targets.html#custom-rundebug), or other pages in the [Run/Debug Configurations](run-debug-configurations-dialog.html) section.
>
>
>
> To quickly access the help page describing a particular configuration, open its settings in `Run | Edit Configurations` and press `F1` (Windows), `⌘ ⇧ F1` (macOS), `F1` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F1` (macOS System Shortcuts), `F1` (XWin), `F1` (GNOME), `F1` (KDE), `F1` (Emacs), `F1` (Sublime Text), `⌘ ⇧ F1` (Sublime Text (macOS)), `⌘ ⇧ F1` (Xcode), `F1` (Visual Studio), `F1` (Visual Studio (macOS)), `F1` (ReSharper), `F1` (ReSharper (macOS)), `F1` (QtCreator), `F1` (QtCreator (macOS)), `F1` (NetBeans), `F1` (Eclipse), `⌘ ⇧ F1` (Eclipse (macOS)).

There are two types of run/debug configurations:

* Temporary — created every time you run/debug a test, test suite, fixture, or a `main()` entry use the gutter icons ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.actions.execute.svg)/ ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.runConfigurations.testState.run_run.svg).

* Permanent — created explicitly from a template or by saving a temporary configuration. Permanent configurations remain as part of your project until you remove them.

Whenever you run, debug, or test your code, CLion either uses an existing permanent run/debug configuration or creates a new temporary one.

Permanent configurations have opaque icons while the icons of temporary configurations are semi-transparent. The red cross over the configuration icon indicates an error in configuration settings.

The maximum number of temporary configurations is 5. The older ones are automatically deleted when new ones are added. If necessary, you can increase this limit in `Settings | Advanced Settings | Run/Debug | Temporary configurations limit` .

![Permanent and temporary configurations have different icons](https://resources.jetbrains.com/help/img/idea/2026.2/cl_rdconfigslist_temporary.png)

## Create permanent run/debug configurations

CLion provides the following ways to create a permanent run/debug configuration:

* [Save a temporary run/debug configuration as permanent](#save-as-permanent).

* [Create from a template](#createExplicitly) or copy an existing configuration.

Procedure: Save a temporary configuration as permanent

* Select a temporary configuration in the run/debug configuration switcher, click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.actions.more.svg) and select Save Configuration.

![Saving a temporary configuration using the configuration switcher](https://resources.jetbrains.com/help/img/idea/2026.2/cl_rdconfigslist_temporary_save.png)

* Alternatively, select a temporary configuration in the Run/debug configurations dialog and click ![Save](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.general.save.svg) on the toolbar.

![Saving a temporary configuration](https://resources.jetbrains.com/help/img/idea/2026.2/cl_temporaryconfigs_save.png)

CLion provides run/debug configuration [templates](#templates) for different languages, tools, and frameworks. The list of available templates varies depending on the installed and enabled [plugins](managing-plugins.html).

Procedure: Create a run/debug configuration from a template

1. Go to `Run | Edit Configurations`. Alternatively, press `Alt+Shift+F10` (Windows), `⌃ ⌥ R` (macOS), `⌥ ⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ R` (macOS System Shortcuts), `Alt+Shift+F10` (XWin), `Alt+Shift+F10` (GNOME), `Alt+Shift+F10` (KDE), `Alt+Shift+F10` (Emacs), `Alt+Shift+F10` (Sublime Text), `⌃ ⌥ R` (Sublime Text (macOS)), `⌘ ⌃ ⌥ ⇧ R` (Xcode), `Ctrl+Alt+Shift+R` (Visual Studio), `⌘ ⌥ ⇧ R` (Visual Studio (macOS)), `Ctrl+Alt+Shift+R` (ReSharper), `⌘ ⌥ ⇧ R` (ReSharper (macOS)), `Ctrl+T` (QtCreator), `⌘ T` (QtCreator (macOS)), `Alt+Shift+F10` (NetBeans), `Alt+Shift+F10` (Eclipse), `⌃ ⌥ R` (Eclipse (macOS)), then `0` (Windows), `0` (macOS), `0` (IntelliJ IDEA Classic (macOS)), `0` (macOS System Shortcuts), `0` (XWin), `0` (GNOME), `0` (KDE), `0` (Emacs), `0` (Sublime Text), `0` (Sublime Text (macOS)), `0` (Xcode), `0` (Visual Studio), `0` (Visual Studio (macOS)), `0` (ReSharper), `0` (ReSharper (macOS)), `0` (QtCreator), `0` (QtCreator (macOS)), `0` (NetBeans), `0` (Eclipse), `0` (Eclipse (macOS)).

2. In the Run/Debug Configurations dialog, click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `⌘ N` (Xcode), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (ReSharper), `⌥ Insert` (ReSharper (macOS)), `Alt+Insert` (QtCreator), `Alt+Insert` (QtCreator (macOS)), `Alt+Insert` (NetBeans), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)). The list shows the run/debug configuration templates.

![New run/debug configuration](https://resources.jetbrains.com/help/img/idea/2026.2/cl_addconfiguration.png)

3. Specify the run/debug configuration name in the Name field. This name will be used to identify the run/debug configuration in lists and menus.

4. Select Allow multiple instances if you want to allow multiple instances of the configuration to run at the same time.  If this option is disabled, attempting to re-run the configuration will terminate the active session.

5. Depending on the chosen template, fill up the configuration settings. For example, [CMake Application](quick-cmake-tutorial.html#targets-configs), [Custom Build Application](custom-build-targets.html#custom-rundebug), [Gradle / Gradle Native Application](gradle-support.html#CreateConfig).

6. In the Before launch section, define whether you want to perform any specific actions before launching the application, for example,  launch an [external tool](configuring-third-party-tools.html)  or another build configuration before run. To skip the build stage, remove Build from the  Before launch  list .

7. You can either run the configuration right away or save the configuration to run it later.

* To save the run configuration for later, click OK.

* To run the configuration right away, click Run.

### Before launch

In this area, you can specify tasks to be performed before starting the selected run/debug configuration. The tasks are performed in the order they appear in the list.

| Item | Shortcut | Description |
| --- | --- | --- |
| ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) | `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `⌘ N` (Xcode), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (ReSharper), `⌥ Insert` (ReSharper (macOS)), `Alt+Insert` (QtCreator), `Alt+Insert` (QtCreator (macOS)), `Alt+Insert` (NetBeans), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)) |    Click this icon to add one of the following available tasks:        * Run External tool: select to run an external application. In the dialog that opens, select one or multiple applications you want to run. If it is not defined in CLion yet, add its definition. For more information, refer to [External tools](configuring-third-party-tools.html) and [External Tools](settings-tools-external-tools.html).    * Run Another Configuration: select to execute another run/debug configuration and wait until it finishes before starting the current configuration. If you want to run several configurations in parallel, use a [compound run/debug configuration](run-debug-multiple.html#compound-configs) .    * Run File Watchers: select this option to have CLion apply all the currently active [File Watchers](using-file-watchers.html).    * Run Grunt task: select this option to run a Grunt task. In the Grunt task dialog that opens, specify the `Gruntfile.js` where the required task is defined, select the task to execute, and specify the arguments to pass to the Grunt tool. Specify the location of the Node.js runtime, the parameters to pass to it, and the path to the grunt-cli package.    * Run gulp task: select this option to run a Gulp task. In the Gulp task dialog that opens, specify the `Gulpfile.js` where the required task is defined, select the task to execute, and specify the arguments to pass to the Gulp tool. Specify the location of the Node.js runtime, the parameters to pass to it, and the path to the gulp package.    * Run npm script: select this option to execute an npm script. In the NPM Script dialog that opens, specify the [npm run/debug configuration settings](installing-and-removing-external-software-using-node-package-manager.html).    * Compile TypeScript: select to run the built-in TypeScript compiler and thus make sure that all the changes you made to your TypeScript code are reflected in the generated JavaScript files. In the TypeScript Compile Settings dialog that opens, select or clear the Check errors checkbox to configure the behaviour of the compiler in case any errors are detected: * If the Check errors checkbox is selected, the compiler will show all the errors and the run configuration will not start. * If the Check errors checkbox is cleared, the compiler will show all the detected errors but the run configuration still will be launched.    * Generate CoffeeScript Source Maps: select this option to generate the source maps for your [CoffeeScript](coffeescript.html) sources. In the dialog that opens, specify where your CoffeeScript source files are located.     |
| ![the Remove button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.remove.svg) | `Alt+Delete` (Windows), `⌘ ⌦` (macOS), `⌘ ⌦` (IntelliJ IDEA Classic (macOS)), `⌘ ⌦` (macOS System Shortcuts), `Alt+Delete` (XWin), `Alt+Delete` (GNOME), `Alt+Delete` (KDE), `Alt+Delete` (Emacs), `Alt+Delete` (Sublime Text), `⌘ ⌦` (Sublime Text (macOS)), `⌘ ⌦` (Xcode), `Ctrl+R, D` (Visual Studio), `⌘ R, D` (Visual Studio (macOS)), `Alt+Delete` (ReSharper), `⌥ ⌦` (ReSharper (macOS)), `Alt+Delete` (QtCreator), `⌘ ⌦` (QtCreator (macOS)), `Alt+Delete` (NetBeans), `Alt+Delete` (Eclipse), `Alt+Delete` (Eclipse (macOS)) |  Click this icon to remove the selected task from the list.  |
|  ![Edit](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.edit.svg)  |  `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))  | Click this icon to edit the selected task. Make the necessary changes in the dialog that opens.  |
|     ![Method up](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.moveUp.svg)       ![Method down](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.moveDown.svg)     |     `Alt+Up` (Windows), `⌃ ⇧ ↑` (macOS), `⌃ ↑` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ ↑` (macOS System Shortcuts), `Alt+Up` (XWin), `Alt+Up` (GNOME), `Alt+Up` (KDE), `Alt+Up` (Emacs), `Alt+Up` (Sublime Text), `Alt+Up` (Sublime Text (macOS)), `⌥ ↑` (Xcode), `Alt+Up` (Visual Studio), `⌃ ⇧ ↑` (Visual Studio (macOS)), `Alt+Up` (ReSharper), `⌃ ⇧ ↑` (ReSharper (macOS)), `Alt+Up` (QtCreator), `⌃ ⇧ ↑` (QtCreator (macOS)), `Ctrl+Alt+Up` (NetBeans), `Ctrl+Shift+Up` (Eclipse), `⌃ ⌥ ↑` (Eclipse (macOS))       `Alt+Down` (Windows), `⌃ ⇧ ↓` (macOS), `⌃ ↓` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ ↓` (macOS System Shortcuts), `Alt+Down` (XWin), `Alt+Down` (GNOME), `Alt+Down` (KDE), `Alt+Down` (Emacs), `Alt+Down` (Sublime Text), `Alt+Down` (Sublime Text (macOS)), `⌥ ↓` (Xcode), `Alt+Down` (Visual Studio), `⌃ ⇧ ↓` (Visual Studio (macOS)), `Alt+Down` (ReSharper), `⌃ ⇧ ↓` (ReSharper (macOS)), `Alt+Down` (QtCreator), `⌃ ⇧ ↓` (QtCreator (macOS)), `Ctrl+Alt+Down` (NetBeans), `Ctrl+Shift+Down` (Eclipse), `⌃ ⌥ ↓` (Eclipse (macOS))     | Click these icons to move the selected task one line up or down in the list. The tasks are performed in the order that they appear in the list.  |
| Show this page |  | Select this checkbox to show the run/debug configuration settings prior to actually starting the run/debug configuration.  |
| Activate tool window |  |      By default this checkbox is selected and the [Run](run-tool-window.html) or the [Debug](debug-tool-window.html) tool window opens when you start the run/debug configuration.       Otherwise, if the checkbox is cleared, the tool window is hidden. However, when the configuration is running, you can open the corresponding tool window for it yourself by pressing `Alt+4` (Windows), `⌘ 4` (macOS), `⌘ 4` (IntelliJ IDEA Classic (macOS)), `⌘ 4` (macOS System Shortcuts), `Alt+4` (XWin), `Alt+4` (GNOME), `Alt+4` (KDE), `Alt+4` (Emacs), `Alt+4` (Sublime Text), `⌘ 4` (Sublime Text (macOS)), `⌘ 6` (Xcode), `Alt+4` (Visual Studio), `⌘ 4` (Visual Studio (macOS)), `Alt+4` (ReSharper), `⌘ 4` (ReSharper (macOS)), `Alt+3` (QtCreator), `⌘ 3` (QtCreator (macOS)), `Alt+4` (NetBeans), `Alt+4` (Eclipse), `⌘ 4` (Eclipse (macOS)) or `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)).      |
| Focus tool window |  |     Select this checkbox to automatically move focus to the [Run](run-tool-window.html) or the [Debug](debug-tool-window.html) tool window when you start the run/debug configuration.     |

## Share run/debug configurations

You might want to share your run/debug configurations so that your teammates could run the application using the same configuration or enable them to remotely attach to the process you are running.

CLion provides a mechanism to store your run/debug configurations as project files and share them through VCS. The same mechanism can also be used when you want to send your configuration as a file to someone else, create a local backup of your run/debug configurations, or import them from a file.

Procedure:

1. Go to `Run | Edit Configurations`. Alternatively, press `Alt+Shift+F10` (Windows), `⌃ ⌥ R` (macOS), `⌥ ⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ R` (macOS System Shortcuts), `Alt+Shift+F10` (XWin), `Alt+Shift+F10` (GNOME), `Alt+Shift+F10` (KDE), `Alt+Shift+F10` (Emacs), `Alt+Shift+F10` (Sublime Text), `⌃ ⌥ R` (Sublime Text (macOS)), `⌘ ⌃ ⌥ ⇧ R` (Xcode), `Ctrl+Alt+Shift+R` (Visual Studio), `⌘ ⌥ ⇧ R` (Visual Studio (macOS)), `Ctrl+Alt+Shift+R` (ReSharper), `⌘ ⌥ ⇧ R` (ReSharper (macOS)), `Ctrl+T` (QtCreator), `⌘ T` (QtCreator (macOS)), `Alt+Shift+F10` (NetBeans), `Alt+Shift+F10` (Eclipse), `⌃ ⌥ R` (Eclipse (macOS)), then `0` (Windows), `0` (macOS), `0` (IntelliJ IDEA Classic (macOS)), `0` (macOS System Shortcuts), `0` (XWin), `0` (GNOME), `0` (KDE), `0` (Emacs), `0` (Sublime Text), `0` (Sublime Text (macOS)), `0` (Xcode), `0` (Visual Studio), `0` (Visual Studio (macOS)), `0` (ReSharper), `0` (ReSharper (macOS)), `0` (QtCreator), `0` (QtCreator (macOS)), `0` (NetBeans), `0` (Eclipse), `0` (Eclipse (macOS)).

2. Select the run/debug configuration you want to share, enable the Store as project file option, and specify the location where the configuration file will be stored.

You can configure any location unless compatibility with CLion 2019.3 and earlier is required. For compatibility with these versions, store the file in the suggested location.

![Store the configuration file](https://resources.jetbrains.com/help/img/idea/2026.2/cl_rdconfigs_share.png)

3. (Optional) If the `.idea` directory is added to VCS ignored files, the `.idea/runConfigurations` subfolder will be ignored, too. If the project uses Git, you can share `.idea/runConfigurations` and leave `.idea` ignored by modifying `.gitignore` as follows:

```
/.idea/*
!/.idea/runConfigurations
```

> **Note:**
> Turning on the  Store as project file  option does not submit anything to the VCS. For run/debug configurations to make their way to a shared repository, you have to check them in like the other versioned files.

## Run/debug configuration templates

All run/debug configurations are based on templates, which implement the startup logic, define the list of parameters and their default values. The [list of available templates](null) is predefined in the installation and can only be extended via [plugins](managing-plugins.html). However, you can edit default parameter values in each template to facilitate the setup of new run/debug configurations.

Procedure: Configure the default values for a template

1. Go to `Run | Edit Configurations`. Alternatively, press `Alt+Shift+F10` (Windows), `⌃ ⌥ R` (macOS), `⌥ ⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ R` (macOS System Shortcuts), `Alt+Shift+F10` (XWin), `Alt+Shift+F10` (GNOME), `Alt+Shift+F10` (KDE), `Alt+Shift+F10` (Emacs), `Alt+Shift+F10` (Sublime Text), `⌃ ⌥ R` (Sublime Text (macOS)), `⌘ ⌃ ⌥ ⇧ R` (Xcode), `Ctrl+Alt+Shift+R` (Visual Studio), `⌘ ⌥ ⇧ R` (Visual Studio (macOS)), `Ctrl+Alt+Shift+R` (ReSharper), `⌘ ⌥ ⇧ R` (ReSharper (macOS)), `Ctrl+T` (QtCreator), `⌘ T` (QtCreator (macOS)), `Alt+Shift+F10` (NetBeans), `Alt+Shift+F10` (Eclipse), `⌃ ⌥ R` (Eclipse (macOS)), then `0` (Windows), `0` (macOS), `0` (IntelliJ IDEA Classic (macOS)), `0` (macOS System Shortcuts), `0` (XWin), `0` (GNOME), `0` (KDE), `0` (Emacs), `0` (Sublime Text), `0` (Sublime Text (macOS)), `0` (Xcode), `0` (Visual Studio), `0` (Visual Studio (macOS)), `0` (ReSharper), `0` (ReSharper (macOS)), `0` (QtCreator), `0` (QtCreator (macOS)), `0` (NetBeans), `0` (Eclipse), `0` (Eclipse (macOS)).

2. In the left-hand pane of the run/debug configuration dialog, click Edit configuration templates….

3. In the  Run/Debug Configuration Templates  dialog that opens, select a configuration type.

4. Specify the desired default parameters and click OK to save the template.

![Editing a configuration template](https://resources.jetbrains.com/help/img/idea/2026.2/cl_rdconfigs_template_settings.png)

> **Tip:**
> You can [share run/debug configuration templates](#share-configurations) with your team members just like regular run/debug configurations.

## Environment variables and program arguments

You can influence the runtime behavior of your app by adding program arguments and environment variables to suitable run/debug configurations.

> **Tip:**
> Configuration environment only affects the process of run/debug and doesn't affect build or other stages such as CMake generation. See [toolchain environment](how-to-create-toolchain-in-clion.html#env-scripts) and [CMake environment](cmake-profile.html#EnvVariables) for more information.

Procedure:

1. Go to `Run | Edit Configurations`. Alternatively, press `Alt+Shift+F10` (Windows), `⌃ ⌥ R` (macOS), `⌥ ⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ R` (macOS System Shortcuts), `Alt+Shift+F10` (XWin), `Alt+Shift+F10` (GNOME), `Alt+Shift+F10` (KDE), `Alt+Shift+F10` (Emacs), `Alt+Shift+F10` (Sublime Text), `⌃ ⌥ R` (Sublime Text (macOS)), `⌘ ⌃ ⌥ ⇧ R` (Xcode), `Ctrl+Alt+Shift+R` (Visual Studio), `⌘ ⌥ ⇧ R` (Visual Studio (macOS)), `Ctrl+Alt+Shift+R` (ReSharper), `⌘ ⌥ ⇧ R` (ReSharper (macOS)), `Ctrl+T` (QtCreator), `⌘ T` (QtCreator (macOS)), `Alt+Shift+F10` (NetBeans), `Alt+Shift+F10` (Eclipse), `⌃ ⌥ R` (Eclipse (macOS)), then `0` (Windows), `0` (macOS), `0` (IntelliJ IDEA Classic (macOS)), `0` (macOS System Shortcuts), `0` (XWin), `0` (GNOME), `0` (KDE), `0` (Emacs), `0` (Sublime Text), `0` (Sublime Text (macOS)), `0` (Xcode), `0` (Visual Studio), `0` (Visual Studio (macOS)), `0` (ReSharper), `0` (ReSharper (macOS)), `0` (QtCreator), `0` (QtCreator (macOS)), `0` (NetBeans), `0` (Eclipse), `0` (Eclipse (macOS)).

2. In the [Run/Debug Configurations](run-debug-configuration-application.html)  dialog that opens, select a configuration where you want to pass the arguments and add the environment variables.

3. Type the arguments in the Program arguments  field. The arguments should be separated with spaces or new lines.

Click ![the Expand field icon](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.expandComponent.svg) to expand the text field, so you can view and edit the arguments as a list.

4. In the Environment variables field, type the variable name and value: `<name>=<value>`. If you add several variables, they should be separated with semicolons.

Alternatively, click ![the Environment variables icon](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.inline.variables.svg) and add the variable name and value to the User environment variables list.

![Adding environment variables](https://resources.jetbrains.com/help/img/idea/2026.2/cl_configs_envvariables.png)

In the dialog that opens, you can also see the list of available system environment variables. Clear the System environment variables checkbox if you don't want to use the system environment variables for the selected configuration.

You can reference existing variables, including the parent environment variables, using the `$VAR$` syntax. Note that such references are case-sensitive: for example, `PATH=xxx:$PATH$` for Linux/macOS and `Path=xxx;$Path$` for Windows.  Referencing existing variables is currently not available for [remote toolchains](remote-projects-support.html) ([CPP-15693](https://youtrack.jetbrains.com/issue/CPP-15693)).

> **Tip:**
> See also [CMake environment](cmake-profile.html#EnvVariables).

5. Use the Load variables from file field to point CLion to a script that configures the environment. This option is available for [CMake](run-debug-configuration-application.html), [Makefile](run-debug-configuration-makefile-application.html), [Gradle Native](run-debug-configuration-gradle-native-application.html), [Custom Build](custom-build-targets.html#custom-rundebug), and test configurations ([Boost.Test](run-debug-configuration-boost-test.html), [Catch](run-debug-configuration-catch.html), [Google Test](run-debug-configuration-google-test.html), [Doctest](doctest-support.html#doctest-config), [CTest](ctest-application.html)).

![Loading environment variables from a file](https://resources.jetbrains.com/help/img/idea/2026.2/cl_envvariables_script.png)

Use the following syntax for setting variables in your script:

Windows:

```SHELL
set VAR=value
```

Linux/macOS:

```SHELL
export VAR=value
```

Note that the environment created by a script is applied only to a single launch of the corresponding configuration and takes precedence over custom values.

The specified script will be run after all the Before launch steps.

## Run/debug configuration folders

When there are many run/debug configurations of the same type, you can group them in folders for easier access.

![Grouped run configurations](https://resources.jetbrains.com/help/img/idea/2026.2/cl_runConfigFolder.png)

Procedure: Create a folder for run/debug configurations

1. Go to `Run | Edit Configurations`. Alternatively, press `Alt+Shift+F10` (Windows), `⌃ ⌥ R` (macOS), `⌥ ⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ R` (macOS System Shortcuts), `Alt+Shift+F10` (XWin), `Alt+Shift+F10` (GNOME), `Alt+Shift+F10` (KDE), `Alt+Shift+F10` (Emacs), `Alt+Shift+F10` (Sublime Text), `⌃ ⌥ R` (Sublime Text (macOS)), `⌘ ⌃ ⌥ ⇧ R` (Xcode), `Ctrl+Alt+Shift+R` (Visual Studio), `⌘ ⌥ ⇧ R` (Visual Studio (macOS)), `Ctrl+Alt+Shift+R` (ReSharper), `⌘ ⌥ ⇧ R` (ReSharper (macOS)), `Ctrl+T` (QtCreator), `⌘ T` (QtCreator (macOS)), `Alt+Shift+F10` (NetBeans), `Alt+Shift+F10` (Eclipse), `⌃ ⌥ R` (Eclipse (macOS)), then `0` (Windows), `0` (macOS), `0` (IntelliJ IDEA Classic (macOS)), `0` (macOS System Shortcuts), `0` (XWin), `0` (GNOME), `0` (KDE), `0` (Emacs), `0` (Sublime Text), `0` (Sublime Text (macOS)), `0` (Xcode), `0` (Visual Studio), `0` (Visual Studio (macOS)), `0` (ReSharper), `0` (ReSharper (macOS)), `0` (QtCreator), `0` (QtCreator (macOS)), `0` (NetBeans), `0` (Eclipse), `0` (Eclipse (macOS)).

2. In the Run/Debug Configurations dialog, select a configuration type and click ![the New Folder icon](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.actions.newFolder.svg) on the toolbar. A new empty folder for the selected type is created.

3. Specify the folder name in the text field to the right or accept the default name.

4. Select the desired run/debug configurations and move them under the target folder.

![Create run/debug configuration folders](https://resources.jetbrains.com/help/img/idea/2026.2/cl_rdconfigs_folders.png)

5. Apply the changes. If a folder is empty, it will not be saved.

When you no longer need a folder, you can delete it `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)). The run/debug configurations grouped under this folder will be moved under the root of the corresponding run/debug configuration type.

## See also

### Procedures

[Debug](debugging-code.html)

### Reference

[Run/debug configurations dialog](run-debug-configurations-dialog.html) [CMake Application](run-debug-configuration-application.html) [Native Application](run-debug-configuration-makefile-application.html) [Custom Build Application](custom-build-targets.html#custom-rundebug)

### External Links

[JetBrains CLion Blog](http://blog.jetbrains.com/clion/)

