# Run/Debug Configuration: Attach to Node.js/Chrome

> **TL;DR**
> Required plugins:
>
>
>
> `JavaScript and TypeScript`, `JavaScript Debugger`, `Node.js` -    the plugins are bundled with CLion and enabled by default.

Create: `Run | Edit Configurations |` ![Add New Configuration](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) `| Attach to Node.js/Chrome`

> **Warning:**
> The following is only valid when the Node.js plugin is [installed and enabled](managing-plugins.html).

In this dialog, create configurations for debugging already running [Node.js](http://nodejs.org/) applications. This approach gives you the possibility to re-start a debugging session without re-starting the Node.js server.

Also use this configuration to debug background and additional main processes of [NW.js](https://nwjs.io/) applications, refer to [Run/Debug Configuration: NW.js](run-debug-configuration-node-webkit.html).

With this configuration, you can also [debug Chrome extensions](debugging-javascript-in-chrome.html#ws_js_debug_chrome_extension).

## Before you start

Procedure:

1. Download and install [Node.js](http://nodejs.org/#download).

2. Install the Node.js plugin  in `Settings | Plugins`  as described in [Installing plugins from JetBrains Marketplace](managing-plugins.html#install_plugin_from_repo).

## Specific Attach to Node.js/Chrome configuration settings

| Item | Description |
| --- | --- |
| Host   | In this field, specify the host where the application is running.   |
| Port   |  In this field, specify the port passed to `--inspect`, `--inspect-brk`, or `--debug` when starting the Node.js process to connect to. Copy this port number from the Debugger listening on... information message in the built-in Terminal or in the [Run](run-tool-window.html) tool window that controls the running application.      ![Start debugging from Run tool window or Terminal: information message](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_debug_attach_from_terminal_info_message.png)   > **Warning:** > Make sure this port is different from the port on which the application is running. The default port is 9229.    |
|    Reconnect automatically    |    Select this checkbox to enable the CLion built-in debugger to re-attach to a running Node.js process after the code of the application is changed.  This lets you debug Node.js applications that use the [nodemon utility](https://nodemon.io/), which automatically reloads your Node.js process when the code is updated.  For more information, refer to [Debugging an application that uses nodemon](running-and-debugging-node-js.html#nodemon).    |
|    Remote URLs of local files    |     In this area, specify the remote paths for the project folders. This is helpful if the root folder of the running application is different from the name of your CLion project root folder. In the example below, the CLion project root folder `/Users/WsProjects/express` is mapped to `/usr/src/app` on the server.      ![Specify Remote URLs of local files](https://resources.jetbrains.com/help/img/idea/2026.2/ws_remote_mappings_in_attach_to_node_configuration.png)  |

## Common settings

When you edit a run configuration (but not a run configuration template), you can specify the following options:

| Item | Description |
| --- | --- |
| Name | Specify a name for the run configuration to quickly identify it among others when editing or running. |
| Store as project file |     Save the file with the run configuration settings to share it with other team members. The default location is `.idea/runConfigurations`. However, if you do not want to share the `.idea` directory, you can save the configuration to any other directory within the project.                           By default, it is disabled, and CLion stores run configuration settings in `.idea/workspace.xml`.    |

## Toolbar

The tree view of run/debug configurations has a toolbar that helps you manage configurations available in your project as well as adjust default configurations templates.

| 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)) | Create a run/debug configuration. |
| ![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)) |  Delete the selected run/debug configuration. Note that you cannot delete default configurations.  |
|  ![Copy](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.copy.svg)  |  `Ctrl+D` (Windows), `⌘ D` (macOS), `⌘ D` (IntelliJ IDEA Classic (macOS)), `⌘ D` (macOS System Shortcuts), `Ctrl+D` (XWin), `Ctrl+D` (GNOME), `Ctrl+D` (KDE), `Meta+D` (Emacs), `Ctrl+Shift+D` (Sublime Text), `⌘ ⇧ D` (Sublime Text (macOS)), `⌘ D` (Xcode), `Ctrl+D` (Visual Studio), `⌘ D` (Visual Studio (macOS)), `Ctrl+D` (ReSharper), `⌘ D` (ReSharper (macOS)), `Ctrl+D` (QtCreator), `⌘ D` (QtCreator (macOS)), `Ctrl+D` (NetBeans), `Ctrl+D` (Eclipse), `Ctrl+D` (Eclipse (macOS))  |  Create a copy of the selected run/debug configuration. Note that you create copies of default configurations.  |
| ![Save configuration](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.save.svg) |  | The button is displayed only when you select a [temporary configuration](run-debug-configuration.html). Click this button to save a temporary configuration as permanent.  |
|  ![Move into new folder / Create new folder](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.actions.newFolder.svg)  |  |     Move into new folder / Create new folder. You can group run/debug configurations by [placing them into folders](run-debug-configuration.html#config-folders).       To create a folder, select the configurations within a category, click ![Folder](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.nodes.folder.svg), and specify the folder name. If only a category is in focus, an empty folder is created.       Then, to move a configuration into a folder, between the folders or out of a folder, use drag or ![Move Up](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.moveUp.svg) and ![Move Down](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.moveDown.svg) buttons.       To remove grouping, select a folder and click ![Remove Configuration](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.remove.svg).     |
|  ![Sort configurations](https://resources.jetbrains.com/help/img/idea/2026.2/app-client.expui.objectBrowser.sortAlphabetically.svg)  |  |   Click this button to sort configurations in the alphabetical order.  |

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

## See also

### Procedures

[Run applications](running-applications.html) [Debug](debugging-code.html)

### Language and Framework-Specific Guidelines

[Running and debugging Node.js](running-and-debugging-node-js.html) [Node.js](developing-node-js-applications.html)

### Reference

[Run/Debug Configuration: Node.js](run-debug-configuration-node-js.html)

