# Debug JavaScript in Chrome

> **TL;DR**
> Required plugins:
>
>
>
> `JavaScript and TypeScript` -    the plugin is bundled with IntelliJ IDEA and enabled by default.
>
>
>
> `JavaScript Debugger` -    install the plugin on the Settings | Plugins page, tab Marketplace.     The plugin is available only in IntelliJ IDEA with the Ultimate subscription.

IntelliJ IDEA provides a built-in debugger for your client-side JavaScript code.

> **Note:**
> Debugging of JavaScript code is only supported in [Google Chrome](http://www.google.com/chrome/) and in other [Chromium-based browsers](https://www.chromium.org/).

The instructions below walk you through the basic steps to get started with this debugger.

## Before you start

Procedure:

1. Make sure the  JavaScript and TypeScript bundled plugin is enabled in the settings.  Press `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)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.  Click the Installed tab. In the search field, type JavaScript and TypeScript. For more information about plugins, refer to [Managing plugins](managing-plugins.html).

2. Install and enable the JavaScript Debugger plugin on the Settings | Plugins page, tab Marketplace, as described in [Installing plugins from
JetBrains Marketplace](managing-plugins.html#install_plugin_from_repo).     The plugin is available only in IntelliJ IDEA with the Ultimate subscription.

3. Configure the built-in debugger as described in [Configuring JavaScript debugger](configuring-javascript-debugger.html).

To have the changes you make to your HTML, CSS, or JavaScript code immediately shown in the browser without reloading the page, activate the Live Edit functionality.  For more information about the live editing functionality, refer to [Live Edit in HTML, CSS, and JavaScript](live-editing.html).

## Debug an application that is running on the built-in server

IntelliJ IDEA has a built-in web server that can be used to debug your application in a web browser or preview your code in the IntelliJ IDEA built-in browser.   This server is always running and does not require any manual configuration.

Procedure: Start debugging

1. Set the [breakpoints](using-breakpoints.html) in the JavaScript code, as required.

2. Open the HTML file that references the JavaScript to debug or select the HTML file in the [Project tool window](project-tool-window.html).

3. From the context menu of the editor or the selection, choose Debug <HTML_file_name>. IntelliJ IDEA generates a debug configuration and starts a debugging session through it. The file opens in the browser, and the [Debug tool window](debug-tool-window.html) appears.

> **Tip:**
> To save the automatically generated configuration for further re-use, choose Save <HTML_file_name> from the context menu after the debugging session is over.

4. In the Debug tool window,   proceed as usual: [step through the program](stepping-through-the-program.html),  [stop
and resume](starting-the-debugger-session.html#pause-resume)  program execution, [examine it when suspended](examining-suspended-program.html), explore the call stack and variables, set watches, evaluate variables, [view actual HTML DOM](viewing-actual-html-dom.html), and so on.

To ignore source maps and step through the actually executed code, press ![the Disable Source Maps toggle button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/sourceMapDisable.png) on the toolbar of the Debug tool window.

> **Tip:**
> By default, a debugging session starts in a new window with a custom [Chrome user data](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md). To open a new Chrome instance with your familiar look-and-feel, configure Chrome in IntelliJ IDEA to start with your user data. For more information, refer to [Starting a debugging session with your default Chrome user data](configuring-javascript-debugger.html#ws_js_debug_default_chrome_user_data).

### Example

Let's suppose that you have a simple application that consists of a `debug_from_run.html` file and a `debug_from_run.js` file, where `debug_from_run.html` references `debug_from_run.js`.

To start debugging this application using the built-in server, set a breakpoint in `debug_from_run.js`, open `debug_from_run.html` in the editor, and select `Debug 'debug_from_run.html'` from the context menu.

![Start debugging session from the editor](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_built_in_server_1_706.png)

IntelliJ IDEA creates a run/debug configuration automatically, and a debugging session starts.

![Debugging session starts, the app opens in the browser](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_built_in_server_2.png)

To restart the new run/debug configuration, select it from the list and click ![the Debug button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg).

![Restart debugging session](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_built_in_server_3.png)

### Reload the current page in browser

Besides restarting your application by clicking the Rerun button (![the Rerun button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.restart.svg)) in the Debug tool window, you can also use the Reload in Browser action to reload the page where you have currently navigated. This works the same way as the Reload Page functionality (`Ctrl+R` (Windows), `⌘ R` (macOS), `⌘ R` (IntelliJ IDEA Classic (macOS)), `⌘ R` (macOS System Shortcuts), `Ctrl+R` (XWin), `Ctrl+R` (GNOME), `Ctrl+R` (KDE), `Alt+Shift+5` (Emacs), `Ctrl+H` (Sublime Text), `⌘ ⌥ F` (Sublime Text (macOS)), `Ctrl+H` (NetBeans), `Ctrl+H` (Visual Studio), `⌃ H` (Visual Studio (macOS)), `Ctrl+F` (Eclipse), `Ctrl+R` (Eclipse (macOS))) in Chrome.

Procedure:

* To reload the current page, click ![the More icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.more.svg) on the toolbar and select Reload in Browser (![Reload in Browser](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.refresh.svg)).

![Reload in Browser action](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_debug_reload_in_browser_action.png)

The example below shows a simple application that consists of two HTML pages and a JavaScript script. The starting `home.html` page has a Submit button on pressing which the `calculator.html` page opens with the results of the `Calculator.js` script execution.

During a debugging session, clicking  the Rerun button (![the Rerun button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.restart.svg)) reloads the `home.html` page with the Submit button. Clicking the Reload in Browser button (![the Reload in Browser button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.refresh.svg)) reloads the `calculator.html` page so all the previous script output is cleared and the debugger returns to line 1 in `Calculator.js`.

![Reloading the current page in browser](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_debug_reload_in_browser.animated.gif)

## Debug an application running on the localhost in the development mode

If your application is running in the development mode on `localhost`, you can start debugging it from the built-in Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Alt+F12` (NetBeans), `Ctrl+Alt+1` (Visual Studio), `⌘ ⌃ 1` (Visual Studio (macOS)), `Alt+F12` (Eclipse), `⌥ F12` (Eclipse (macOS))), from the [Run tool
window](run-tool-window.html), or from the [Debug tool window](debug-tool-window.html). Just hold `Ctrl+Shift` (Windows), `Ctrl+Shift` (macOS), `Ctrl+Shift` (IntelliJ IDEA Classic (macOS)), `Ctrl+Shift` (macOS System Shortcuts), `Ctrl+Shift` (XWin), `Ctrl+Shift` (GNOME), `Ctrl+Shift` (KDE), `Ctrl+Shift` (Emacs), `Ctrl+Shift` (Sublime Text), `Ctrl+Shift` (Sublime Text (macOS)), `Ctrl+Shift` (NetBeans), `Ctrl+Shift` (Visual Studio), `Ctrl+Shift` (Visual Studio (macOS)), `Ctrl+Shift` (Eclipse), `Ctrl+Shift` (Eclipse (macOS)) and click the URL at which the application is running.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_start_debugging_from_run_tool_window.mp4)

Procedure:

1. Set the [breakpoints](using-breakpoints.html) in your code.

2. Start the application in the development mode, for example, using an npm script.

3. The Run tool window or the Terminal shows the URL at which your application is running.   Hold `Ctrl+Shift` (Windows), `Ctrl+Shift` (macOS), `Ctrl+Shift` (IntelliJ IDEA Classic (macOS)), `Ctrl+Shift` (macOS System Shortcuts), `Ctrl+Shift` (XWin), `Ctrl+Shift` (GNOME), `Ctrl+Shift` (KDE), `Ctrl+Shift` (Emacs), `Ctrl+Shift` (Sublime Text), `Ctrl+Shift` (Sublime Text (macOS)), `Ctrl+Shift` (NetBeans), `Ctrl+Shift` (Visual Studio), `Ctrl+Shift` (Visual Studio (macOS)), `Ctrl+Shift` (Eclipse), `Ctrl+Shift` (Eclipse (macOS)) and click this URL link. IntelliJ IDEA starts a debugging session with an automatically generated  configuration of the type [JavaScript Debug](run-debug-configuration-javascript-debug.html).

If you launched your application in the development mode from the [New Terminal](terminal-emulator.html), you can just click the Start debugging in browser button next to the link.

![New Terminal: the Start debugging in browser button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_start_debugging_from_new_terminal_start_debugging_button.png)

By default, the button is not shown. To have it displayed,   open 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)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Advanced Settings`, and select the Show 'Start Debugging in Browser' button for localhost links in the Terminal checkbox in the JavaScript and TypeScript area.

> **Note:**
> The button is not available from the New Terminal in the WSL.

This also works for debugging [Vue.js](vue-js.html#vue_running_and_debugging_debug), [Angular](run-and-debug-angular-applications.html#angular_running_and_debugging_debug), [React](run-and-debug-react-applications.html#react_running_and_debugging_debug), and [Node.js](running-and-debugging-node-js.html#ws_node_debug_from_run_tw) applications.

## Debug an application that is running on a remote web server

Often you may want to debug client-side JavaScript of an application that is running on an external development web server.

### What is a remote web server?

In IntelliJ IDEA, any server with the document root outside the current project is called remote. This server may be actually running on a physically remote host or on your machine.

For example, if your project is in `C:/IntelliJ IDEAProjects/MyProject` and the web server document root is `C:/XAMPP/htdocs`, for IntelliJ IDEA this web server is remote.

### How do I synchronize my application sources on the server with their local copies in my IntelliJ IDEA project?

To debug an application on a remote web server, you need to have the copies of its sources in an IntelliJ IDEA project. To synchronize local and remote sources, create a deployment configuration as described in [Create a remote server configuration](creating-a-remote-server-configuration.html) and [Connect to a web server](configuring-synchronization-with-a-remote-host.html) .

Procedure: Debug an application on a remote web server

1. Set the [breakpoints](using-breakpoints.html) in the JavaScript code, as required.

2. Create a run/debug configuration of the JavaScript Debug type:

Go to `Run | Edit Configurations`, then in the Edit Configurations dialog,  in the Edit Configurations dialog that opens,    click the Add button (![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg)) on the toolbar and select JavaScript Debug from the list.

3. In the [Run/Debug Configuration: JavaScript Debug](run-debug-configuration-javascript-debug.html) dialog that opens, specify the URL address at which the application is running.

This URL address should be a concatenation of the Web server root URL and the path to the HTML file relative to the web server document root in accordance with server access configuration.  For more information, refer to [Connect to a web server](configuring-synchronization-with-a-remote-host.html).

Click OK to save the configuration settings.

4. Choose the newly created configuration in the Select run/debug configuration list on the toolbar and click the Debug button ![Start the debugger](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg). The HTML file specified in the run configuration opens in the chosen browser and the [Debug tool window](debug-tool-window.html) appears.

5. In the Debug tool window,   proceed as usual: [step through the program](stepping-through-the-program.html),  [stop
and resume](starting-the-debugger-session.html#pause-resume)  program execution, [examine it when suspended](examining-suspended-program.html), explore the call stack and variables, set watches, evaluate variables, [view actual HTML DOM](viewing-actual-html-dom.html), and so on.

To ignore source maps and step through the actually executed code, press ![the Disable Source Maps toggle button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/sourceMapDisable.png) on the toolbar of the Debug tool window.

> **Tip:**
> By default, a debugging session starts in a new window with a custom [Chrome user data](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md). To open a new Chrome instance with your familiar look-and-feel, configure Chrome in IntelliJ IDEA to start with your user data. For more information, refer to [Starting a debugging session with your default Chrome user data](configuring-javascript-debugger.html#ws_js_debug_default_chrome_user_data).

### Example: Debug without mappings

Suppose you have a simple application that consists of an `index.html` file and an `App.js` file, where `index.html` references `App.js`.

Procedure:

1. Let's now deploy our simple application to a local web server , refer to [Deployment](deploying-applications.html)   . In the following example, it is Apache:

![Debug JavaScript on an external web server: uploaded sources on the remote host](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_external_server_0.png)

2. When using a local web server, such as Nginx or Apache, as in our example, or the web server is on a remote host, you need to create a Run/Debug configuration to start the JavaScript debugger. To do that, click the list at the upper right-hand corner of the IntelliJ IDEA window and choose Edit Configurations. Alternatively, choose `Run | Edit Configurations` from the main menu:

![Debug JavaScript on an external web server: open Edit configurations dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_external_server_1.png)

In the Run/Debug Configurations dialog, click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) and choose JavaScript Debug from the list:

![Create JavaScript Debug configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_external_server_2.png)

Specify the URL of your running application, in our example it is `http://localhost:8888/MySimpleApp/index.html`

![URL to run your application](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_external_server_3.png)

In our example, the local project structure and the file structure on the server are the same so no mappings are required.

3. Now we can start debugging: choose the new run/debug configuration from the list in the upper right-hand corner of the IntelliJ IDEA window, and then click ![the Debug button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg):

![Editor, main menu and the toolbar](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_quick_start_debug_external_server_4.png)

In the Debug tool window,   proceed as usual: [step through the program](stepping-through-the-program.html),  [stop
and resume](starting-the-debugger-session.html#pause-resume)  program execution, [examine it when suspended](examining-suspended-program.html), explore the call stack and variables, set watches, evaluate variables, [view actual HTML DOM](viewing-actual-html-dom.html), and so on.

To ignore source maps and step through the actually executed code, press ![the Disable Source Maps toggle button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/sourceMapDisable.png) on the toolbar of the Debug tool window.

### Mappings

Mappings set correspondence between files on a web server and their local copies. You need mappings:

* When your application is deployed and running on a remote web server.

* When you have defined several resource root folders in addition to the project root.

IntelliJ IDEA attempts to guess path mappings  from the deployment configuration or based on file and script names and content. However, if your application structure is complicated, you need to specify path mappings manually.

Procedure: Configure mappings

1. Create a debug configuration of the type JavaScript Debug as described in [Debugging an application](#create_js_debug_configuration).

2. In the Remote URLs of local files area, map the files and folders to URL addresses of files and folders on the server according to the currently used deployment configuration, see [Mapping local folders to
folders
on the server and the URL addresses to access them](creating-a-remote-server-configuration.html#mapping).

#### Example: Debug with mappings

Suppose that for some reason you decide to change the folder structure of the application from the [previous example](#ws_js_debug_on_remote_server_example) and move `index.html` and `App.js` to a separate folder `src`.

![The structure of local folders differs from the folder structure on the remote web server](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_debug_on_remote_server_example_mappings_1.png)

Because the local sources and  the application on the web server are structured differently, the debugger will be unable to sync the local sources with the code that is actually executed.

To solve the problem, let's map the URL address of the application root with the `src` folder.

Procedure:

1. Start creating a run/debug configuration [as described above](#ws_js_debug_on_remote_server_example_create_run_debug_config).

2. In the Run/Debug Configurations dialog, click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) in the Remote URLs of local files area.

3. In the dialog that opens, select the `src` folder under `MySimpleApp`.

4. In the Remote URL field, type the URL address of the application, in our example it is `http://localhost:8888/MySimpleApp`

![URL mapping](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_debug_on_remote_server_example_mappings_2.png)

5. Save the run/debug configuration and launch it [as described above](#ws_js_debug_on_remote_server_example_start_debugging).

For more debugging examples, refer to the following posts in the WebStorm blog: [Debugging React Applications](https://blog.jetbrains.com/webstorm/2017/01/debugging-react-apps/) and [Debugging Angular Applications](https://blog.jetbrains.com/webstorm/2017/01/debugging-angular-apps/).

## Debug in Code with Me session

You can also start debugging during a [Code with Me](code-with-me.html) session. No matter whether you act as a host or a client, the browser opens on the side that started a debugging session.

## Debug asynchronous code

IntelliJ IDEA supports debugging asynchronous client-side JavaScript code.  IntelliJ IDEA recognizes breakpoints inside asynchronous code, stops at them, and lets you step into such code. As soon as a breakpoint inside an asynchronous function is hit or you step into asynchronous code, a new element `Async call from <caller>` is added in the Frames pane of the Debugger tab. IntelliJ IDEA displays a full call stack, including the caller and the entire way to the beginning of the asynchronous actions.

![Debugging asynchronous JavaScript code](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_debug_tool_window_async.animated.gif)

In the example above, the debugger stops at line3(breakpoint), then at line5(breakpoint). On clicking Step into, the debugger will stop at line5 (on `function`), then will move to line6.

The asynchronous debugging mode is turned on by default. To disable asynchronous stack traces, set `js.debugger.async.call.stack.depth` in Registry to `0`.

## Debug workers

IntelliJ IDEA supports debugging [Service Workers](https://www.w3.org/TR/service-workers/) and [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers). IntelliJ IDEA recognizes breakpoints in each worker and shows the debug data for it as a separate thread in the Frames pane on the Debugger tab of the [Debug tool window](debug-tool-window.html).

Note that IntelliJ IDEA can debug only [dedicated workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Dedicated_workers), debugging for [shared workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Shared_workers) is currently not supported.

Procedure:

1. Set the [breakpoints](using-breakpoints.html) in the Workers to debug.

2. If you are using Service Workers, make sure the Allow unsigned requests checkbox is selected on the  [Debugger](settings-debugger.html) page (`Settings| Build, Execution, Deployment | Debugger`). Otherwise your service workers may be unavailable during a debug session.

3. Create a debug configuration of the type JavaScript Debug as described above in [Debugging
client-side JavaScript running on an external web server](#create_js_debug_configuration).

4. From the Run widget list on the toolbar, select the newly created  configuration and click ![the Debug button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg) next to it.

The HTML file specified in the run configuration opens in the browser and the [Debug tool window](debug-tool-window.html) opens with the Frames list showing all the available Workers:

![Debugging Service Workers](https://resources.jetbrains.com.cn/help/img/idea/2026.2/Chrome](run-debug-configuration-node-js-remote-debug.html). Note that you have to start Chrome with your [custom Chrome
user data profile](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md), learn more from [Start a debugging session with your preferred Chrome user data](configuring-javascript-debugger.html#ws_js_debug_default_chrome_user_data).

Procedure: Create an Attach to Node.js/Chrome run/debug configuration

1. Go to `Run | Edit Configurations`. Alternatively, select Edit Configurations from the Run widget on the toolbar.

![Open the Edit Configurations dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_node_run_config_create.png)

In the Edit Configurations dialog that opens,    click the Add button (![the Add button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg)) on the toolbar and select Attach to Node.js/Chrome from the list.

![Select the Attach to Node.js /Chrome configuration type](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_node_debug_remote_chrome_create_attach_run_config.png)

The [Run/Debug Configuration: Attach to Node.js/Chrome](run-debug-configuration-node-js-remote-debug.html) dialog opens.

2. Specify the configuration name and accept the predefined host and port values `localhost:9229`.

> **Note:**
> If you specify a custom port, make sure you specify it later when running Chrome from the command line.

![Create an Attach to Node.js/Chrome run/debug configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_debug_extension_create_run_config.png)

3. Click Apply and OK to save the configuration and leave the dialog.

Procedure: Run Chrome and load the extension

1. [Run Chrome from
the command line](https://www.chromium.org/developers/how-tos/run-chromium-with-flags/) to specify the remote debugging port and [your
Chrome user data directory](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md).

Open your command-line shell or  the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Alt+F12` (NetBeans), `Ctrl+Alt+1` (Visual Studio), `⌘ ⌃ 1` (Visual Studio (macOS)), `Alt+F12` (Eclipse), `⌥ F12` (Eclipse (macOS)))  and type:

```SHELL
<path_to_chrome_executable> --remote-debugging-port=<port_specified_in_run_configuration> --user-data-dir=<your_Chrome_user_data_directory>
```

> **Note:**
> The predefined port is `9229`.

2. [Load your unpacked extension](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked) to the Chrome window that opens.

Procedure: Start debugging

1. [Set the breakpoints](using-breakpoints.html) where necessary.

2. From the Run widget list on the toolbar, select the newly created Attach to Node.js/Chrome configuration and click ![the Debug button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg) next to it.

![Select the Attach to Node.js/Chrome configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_js_debug_extension_select_run_config.png)

The [Debug tool window](debug-tool-window.html) opens.

3. Go to the Chrome tab where your extension is loaded.

4. Switch to IntelliJ IDEA. In the Debug tool window, [step through the breakpoints](stepping-through-the-program.html), switch between frames, change values on-the-fly, [examine a suspended program](examining-suspended-program.html),  [evaluate expressions](examining-suspended-program.html#evaluating-expressions) , and  [set watches](examining-suspended-program.html#watches).

## See also

### Procedures

[Debug code](debugging-code.html)   [Debug tool window](debug-tool-window.html)

### Reference

[Run/Debug Configuration: JavaScript Debug](run-debug-configuration-javascript-debug.html)

