# Vite

> **TL;DR**
> Required plugins:
>
>
>
> `JavaScript and TypeScript`, `Vite` -    the plugins are bundled with IntelliJ IDEA and enabled by default.

IntelliJ IDEA integrates with the [Vite](https://vitejs.dev/) build tool that improves the frontend development experience. Vite consists of a dev server and a build command. The development server serves your source files over native ES modules. The build command bundles your code with Rollup, which is pre-configured to output highly optimized static assets for production.

IntelliJ IDEA supports `tsconfig.json` and `jsconfig.json` path mappings in Vue `style` tags and recognizes [Vite aliases](https://vitejs.dev/config/#resolve-alias).

In projects that consist of multiple modules with different Vite configurations, IntelliJ IDEA can automatically detect the relevant configuration file for each module and use the module resolution rules from it, refer to [Specifying
the Vite configuration file to use](#specify_vite_configuration_file_auto_detection) below.

> **Note:**
> IntelliJ IDEA integration with Vite requires that the `vite` package to be installed in your project or globally. Therefore, either [create
> an application with create-vite](#create_new_vite_app)  or [install
> the vite package manually](#install_vite_in_empty_project). [To
> work with an existing Vite app](#starting_with_existing_vite_application), make sure your `package.json` lists Vite before running `npm install`.

## Before you start

Procedure:

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

2. Make sure the JavaScript and TypeScript and Vite required plugins are enabled on the Settings | Plugins page, tab Installed. For more information, refer to [Managing plugins](managing-plugins.html).

## Create a new Vite application

The recommended way to start a new Vite application is the [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) package, which IntelliJ IDEA downloads and runs for you using [npx](https://www.npmjs.com/package/npx). As a result, your development environment is preconfigured to use Vite and a basic template for one of the popular frameworks, such as [React](react.html), [Vue.js](vue-js.html), [Svelte](null), etc.

Of course, you can still download `create-vite` yourself or create an empty IntelliJ IDEA project and install Vite in it.

> **Tip:**
> Learn more about starting with Vite from the [Vite.js official
> website](https://vitejs.dev/guide/#scaffolding-your-first-vite-project).

### Generate a Vite application with create-vite

Procedure:

1. Select `File | New | Project` from the main menu or click the New Project button on the Welcome screen.

2. In the New Project dialog, select Vite in the left-hand pane.

3. In the right-hand pane:

* Specify the project name and the folder to create it in.

* In the Node runtime field, specify the Node.js runtime to use. Select a configured runtime from the list or choose Add to configure a new one.

* From the Vite list, select npx create-vite. Alternatively, for npm version 5.1 and earlier, install the `create-vite` package yourself by running `npm install --g create-vite` in the 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)). When creating an application, select the folder where the `create-vite` package is stored.

* From the Template list, select the [community maintained Vite template](https://github.com/vitejs/awesome-vite#templates) that targets the framework you are going to use in your application.

* Optionally: To use TypeScript instead of JavaScript, select the Use TypeScript template checkbox. IntelliJ IDEA will generate `.ts` files for your application and a `tsconfig.json` configuration file.

4. When you click Create, IntelliJ IDEA generates a Vite-specific project with all the required configuration files and downloads the required dependencies. IntelliJ IDEA also creates an npm dev configuration with default settings for running your application.

> **Tip:**
> Alternatively, open the built-in Terminal and type:
>
>
>
> 1.  `npx create-vite <application-name>` to create an application.
>
> 2.  `cd <application-name>` to switch to the application folder.
>
> 3.  `npm start` to start the Node.js server.

### Install Vite in an empty IntelliJ IDEA project

In this case, you will have to configure the build pipeline yourself. Learn more about adding Vite to a project from the [Vite official website](https://vitejs.dev/guide/).

Procedure: Create an empty IntelliJ IDEA project

1. Select `File | New | Project` from the main menu or click the New Project button on the Welcome screen.

2. In the New Project dialog, select New Project in the left-hand pane.

3. In the right-hand pane, select JavaScript in the Language area.

4. Name the new project and change its location if necessary, then click Create.

Procedure: Install Vite in an empty project

1. Open the empty project where you will use Vite.

2. In your command-line shell or in 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)))  , type:

`npm install --save-dev vite`

## Start with an existing Vite application

To continue developing an existing Vite application, open it in IntelliJ IDEA and download the required dependencies.

Procedure: Open the application sources that are already on your machine

* Click Open or Import on the Welcome screen or select `File | Open`   from the main menu. In the dialog that opens, select the folder where your sources are stored.

Procedure: Check out the application sources from your version control

1. Click Clone Repository on the Welcome screen.

Alternatively, select  `File | New | Project from Version Control…` or  `Git | Clone…` or `VCS | Get from Version Control` from the main menu.

Instead of Git in the main menu, you may see any other Version Control System that is associated with your project. For example, Mercurial or Perforce.

2. In the dialog that opens, select your version control system from the list and specify the repository to check out the application sources from. For more information, refer to [Check out a
project (clone)](manage-projects-hosted-on-github.html#clone-from-GitHub).

Procedure: Download the dependencies

* Click Run 'npm install' or Run 'yarn install' in the popup:

![Open an application and download the dependencies](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_npm_yarn_package_run_npm_install.png)

You can use [npm](https://docs.npmjs.com/), [Yarn 1](https://classic.yarnpkg.com/lang/en/), or [Yarn 2](https://yarnpkg.com/), refer to [npm and Yarn](installing-and-removing-external-software-using-node-package-manager.html) for details.

* Alternatively, select Run 'npm install' or Run 'yarn install' from the context menu of `package.json` in the editor or in the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))) .

> **Note:**
> Make sure your `package.json` lists the `vite` package under `dependencies` or `devDependencies`. That is necessary because IntelliJ IDEA integration with Vite, especially autodetecting configuration files, requires that the `vite` package should be installed in your project or globally.

### Project security

When you open a project that was created outside IntelliJ IDEA and was imported into it, IntelliJ IDEA displays a dialog where you can decide how to handle this project with unfamiliar source code.

Select one of the following options:

* Preview in Safe Mode: in this case, IntelliJ IDEA opens the project in a preview mode. It means that you can browse the project's sources but you cannot run tasks and script or run/debug your project. IntelliJ IDEA displays a notification on top of the editor area, and you can click the Trust project… link and load your project at any time.

* Trust Project: in this case, IntelliJ IDEA opens and loads a project. That means the project is initialized, project's plugins are resolved, dependencies are added, and all IntelliJ IDEA features are available.

* Don't Open: in this case, IntelliJ IDEA doesn't open the project.

Learn more from [Project security](project-security.html).

> **Tip:**
> Projects created from the Welcome screen or via `File | New | Project` as described in  are automatically considered trusted.

## Configure Vite in IntelliJ IDEA

Procedure: Create Vite configuration files

* Create one or several configuration files depending on your project structure: select a parent folder in the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS)))  and then select `New | JavaScript file` from the context menu.

![Create a Vite configuration file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_create_config.png)

The acceptable names are `vite.config.js`/ `vite.config.ts`, `vite.config.mjs`, or `vite.config.cjs`.

Learn more from the [Vite official website](https://vitejs.dev/config/).

* If necessary, use `alias` that will be later recognized in `import` statements. Make sure you specify absolute paths in definitions of aliases. Learn more from the [Vite
official website](https://vitejs.dev/config/shared-options.html#resolve-alias).

![Completing alias in import statements](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_alias_completion.animated.gif)

### Specify the Vite configuration files to use

Based on the analysis of a Vite configuration file, IntelliJ IDEA understands the Vite configuration, resolves modules, and provides coding assistance in JavaScript and TypeScript files.

In IntelliJ IDEA, you can choose between two configuration modes – automatic and manual.

With [automatic
configuration](#specify_vite_configuration_file_auto_detection_procedure), IntelliJ IDEA auto-detects the relevant Vite configuration file for each JavaScript or TypeScript file.

With [manual
configuration](#specify_vite_configuration_file_manual), you specify the Vite configuration file to use in your project. Manual configuration is useful if the name of your Vite configuration file is not recognized by IntelliJ IDEA, refer to the [list of
recognized Vite config
names](#specify_vite_configuration_recognized_names) below.

Procedure: Choose how to detect Vite configuration

1. 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))) and go to `Languages & Frameworks | JavaScript | Vite`.

2. In the Detect Vite configuration files for module resolution area, select one of the following options:

* Automatically: In this mode, for a JavaScript or TypeScript file, IntelliJ IDEA will first look for a Vite configuration file in the folder where this JavaScript or TypeScript file is located, then in its parent folder, and so on. As a result, if your project consists of multiple modules with different Vite configurations, each module will use the module resolution rules from its own Vite configuration file (if such config is found). IntelliJ IDEA recognizes JavaScript or TypeScript Vite configuration files with the following names and in the following order: * `vite.config.js` / `vite.config.ts` * `vite.config.mjs` * `vite.config.cjs`

* Manually: In the Configuration file field, specify the location of the Vite config to use. In this mode, the resolution rules from the specified configuration file will be applied to all modules in your project. Select this option if the name of your Vite configuration file is not recognized by IntelliJ IDEA, refer to the [list of recognized Vite config names](#specify_vite_configuration_recognized_names) above. ![Select a vite configuration file manually](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_select_config.png)

## Run a Vite application

Procedure:

1. Сlick ![the Run icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.run.run.svg) in the gutter next to the `dev` script in `package.json`, or execute the `npm run dev` command in the 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)), or double-click the `dev` task in the [npm tool window](npm-tool-window.html) (`View | Tool Windows | npm`).

![Run a Vite app in the development mode from package.json](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_run_dev_mode_package_json.animated.gif)

2. Wait till the application is compiled and the development server is ready.

The Run tool window or the Terminal shows the URL at which your application is running. If your application was generated with create-vue, the default URL is `http://localhost:5173/`.  Click this link to view the application.

![Vue.js app is running in the development mode](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vue_run_app_url.png)

### Run a Vite application via a run/debug configuration

For applications created with `create-vite` in the IntelliJ IDEA New Project wizard [as described above](#creating_vite_app_with_create_vite), IntelliJ IDEA generates an [npm](run-debug-configuration-npm.html) configuration  with the default name npm dev. This configuration runs the `vite` command that launches the development server and starts your application in the development mode.

In other cases, you need to [create a
run/debug configuration](#vite_running_and_debugging_run_via_rc_create_rc) with the actual settings, such as host, port, etc., manually.

Procedure: Create an npm 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/vite_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 npm from the list.

2. In the Configuration tab of the Run/Debug Configurations: npm dialog that opens, specify the location of the `package.json`, the Node.js runtime, and the package manager to use.

In the Command field, select run from the list and then select the script to run from the Scripts list. Most likely it will be the default `dev` script but you can configure another one in your `package.json`, for example, to run the application on a custom port.

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

3. Optionally:

To open the application in the browser, update the configuration as follows: in the Browser / Live Edit tab, select the After launch checkbox, select the browser to open the application in, and specify the URL address at which the application wil run.

If you are going to debug the application, select [Google Chrome](http://www.google.com/chrome/) or another [Chromium-based browser](https://www.chromium.org/).

![Browser / Live Edit tab: select browser](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_run_rc_browser_tab_select_browser.png)

Procedure: Run an application

1. Select the npm dev run configuration from the list on the toolbar and click ![Run](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.execute.svg) next to it.

![Run a Vite app in the development mode via a run/debug configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_run_dev_mode.png)

2. Wait till the application is compiled and the development server is ready.

The Run tool window or the Terminal shows the URL at which your application is running. Click this link to view the application.

![Running Vite app: the Development server is ready](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_run_dev_server_ready.png)

Alternatively, enable IntelliJ IDEA to open the application on start [as
described above](#ws_vite_start_app_in_dev_mode_enable_opening_browser).

> **Note:**
> When the development server is running, your application is automatically reloaded as soon as you change any of the source files and save the updates.

## Debug a Vite application

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

You can start a debugging session either by [launching a
run/debug configuration](#vite_debug_with_rc) or [from the Run tool
window](#vite_debug_from_tw) that shows the URL at which your application is running in the development mode.

### Start debugging via a run/debug configuration

To debug your Vite application you need two run/debug configurations:

* An npm configuration to start your application in the development mode, [as described above](#vite_run).

* A JavaScript Debug configuration to attach the debugger to the application that is running in the development mode.

You can create a JavaScript Debug configuration within the npm configuration to launch them at once, as described in [Run and debug a
Vite application with an npm run/debug configuration](#vite_debug_two_rc).

Alternatively, create and launch an npm and a JavaScript Debug run/debug configurations separately, as described in [Start debugging with a JavaScript Debug run/debug configuration](#vite_debug_via_js_debug_rc).

Procedure: Run and debug a Vite application with a single npm run/debug configuration

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

2. Create an npm configuration [as described above](#vite_running_and_debugging_run_via_rc_create_rc).

If you generated your application with `create-vite`, IntelliJ IDEA has already created an npm configuration with the default name npm dev. The configuration is available from the Run widget and in the Run/Debug Configurations dialog.

![Autogenerated npm run/debug configuration](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_debug_autogenerated_npm_rc.png)

3. In the Configuration tab of the Run/Debug Configurations: npm dialog that opens, specify the location of the `package.json`, the Node.js runtime, and the package manager to use.

In the Command field, select run from the list and then select the script to run from the Scripts list. Most likely it will be the default `dev` script but you can configure another one in your `package.json`, for example, to run the application on a custom port.

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

4. In the Browser / Live Edit tab, select the After launch checkbox, select [Google Chrome](http://www.google.com/chrome/) or another [Chromium-based browser](https://www.chromium.org/) from the list, select the with JavaScript debugger checkbox, and then specify the URL at which your application will run.

![npm configuration, Browser tab](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_debug_npm_rc_browser_tab.png)

5. Click Run.

To re-run the configuration, select it from the list in the  Run widget and click ![Run](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.execute.svg) next to it.

IntelliJ IDEA runs the application in the development mode and at the same time launches a debugging session.

![Debugging session](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_debug_npm_rc_debugging_session.png)

6. When the first breakpoint is hit, switch to the [Debug tool window](debug-tool-window.html) and   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.

Procedure: Start debugging with a JavaScript Debug run/debug configuration

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

2. Start the application in the development mode [as described above](#vite_run_steps) and wait till the application is compiled and the development server is ready.

The Run tool window or the Terminal shows the URL at which your application is running. Copy this URL to [specify it later
in the JavaScript Debug
configuration](#vite_debug_specify_URL).

![Application is running in the development mode](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_debug_app_running_in_dev_mode.png)

3. Create a JavaScript Debug configuration. To do that, go to `Run | Edit Configurations` in the main menu, click ![the Add icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg), and select Javascript Debug from the list.

4. In the Run/Debug Configurations: JavaScript Debug dialog that opens, specify the name of the configuration and the URL address at which the application is running in the development mode. You can copy this URL in the Run tool window or in the Terminal, [as described above](#vite_debug_dev_mode_URL).

![Create a JavaScript Debug configuration: specify the URL](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_debug_create_js_debug_rc.png)

5. Click Debug.

To re-run the configuration, select it from the list in the  Run widget and click ![Debug](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.run.debug.svg) next to it.

![Run a JavaScript Debug configuration from the Run widget](https://resources.jetbrains.com.cn/help/img/idea/2026.2/vite_debug_rerun_js_debug_rc.png)

6. When the first breakpoint is hit, switch to the [Debug tool window](debug-tool-window.html) and   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.

### Start debugging from the Run tool window or from the built-in Terminal

If your application is running in the development mode on `localhost`, in particular, if it was generated with `create-vite`, you can launch a debugging session right from the >Run tool window or from the built-in Terminal.

Procedure:

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

2. Start the application in the development mode [as described above](#vite_run_steps) and wait till the application is compiled and the development server is ready.

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

![Starting a debugging session from the Run tool window, the application is running on localhost](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ws_vite_debug_from_tw_localhost_custom_port.animated.gif)

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_vite_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.

When the first breakpoint is hit, switch to the [Debug tool window](debug-tool-window.html) and   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.

### Troubleshooting for Node.js 17+

If you are using Node.js version 17 or later, during a debugging session you may face network connectivity issues that result in problems with attaching the debugger or with loading sourcemaps.

The workaround is to pass `--host 127.0.0.1` to the server. You can do that in one of the following ways:

* Update the `dev` script in your `package.json`: ```JSON "dev": "vite --host=127.0.0.1" ```

* Alternatively, add `dns.setDefaultResultOrder('ipv4first')` to your `vite.config.ts`.

