Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 5 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Unleash Nuxt Developer Experience.
</p>

> [!NOTE]
> You are current at the `main` branch for v4 development. The latest stable branch is [`v3`](https://github.com/nuxt/devtools/tree/v3).
> You are at the `main` branch for v4. The v3 branch is [`v3`](https://github.com/nuxt/devtools/tree/v3).

<br>

## Installation

> Nuxt DevTools v2 requires **Nuxt v3.15.0 or higher**.
> Nuxt DevTools v4 requires **Nuxt v4.5.0 or higher** (Vite 8). It is built on [Vite DevTools](https://github.com/vitejs/devtools) and shows up as the `Nuxt` group inside the Vite DevTools panel.

Nuxt DevTools is **enabled by default** in Nuxt v3.8.0. You can press <kbd>Shift</kbd> + <kbd>Alt</kbd> / <kbd>⇧ Shift</kbd> + <kbd>⌥ Option</kbd> + <kbd>D</kbd> in your app to open it up.
Nuxt DevTools is **enabled by default**. You can press <kbd>Shift</kbd> + <kbd>Alt</kbd> / <kbd>⇧ Shift</kbd> + <kbd>⌥ Option</kbd> + <kbd>D</kbd> in your app to open it up.

If you want to explicitly enable or disable Nuxt DevTools, you can update your `nuxt.config` with:

Expand All @@ -44,52 +44,9 @@ export default defineNuxtConfig({
})
```

### Opting in to v4.0
### Nuxt 4

Nuxt DevTools v4.0 is currently in alpha. Since Nuxt ships with a built-in version of DevTools, you can opt-in to v4.0 by using package manager resolutions to override the bundled version:

<details>
<summary>npm</summary>

```json
{
"overrides": {
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
```

</details>

<details>
<summary>yarn</summary>

```json
{
"resolutions": {
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
```

</details>

<details>
<summary>pnpm</summary>

```json
{
"pnpm": {
"overrides": {
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
}
```

</details>

Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
Nuxt 5 ships with Nuxt DevTools v4. Nuxt 4.5+ still bundles v3; override `@nuxt/devtools` to `^4.0.0` with your package manager (`overrides` for npm and pnpm, `resolutions` for yarn), remove your lockfile and reinstall. See the [upgrade guide](https://devtools.nuxt.com/guide/upgrading-to-v4) for details and for what changed.

### Nightly Release Channel

Expand Down
42 changes: 3 additions & 39 deletions docs/content/1.guide/0.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,11 @@ export default defineNuxtConfig({

### Open the DevTools Panel

Restart your Nuxt server and open your app in browser. Click the Nuxt icon on the bottom (or press :kbd{value="Shift"} + :kbd{value="Alt"} / :kbd{value="⇧ Shift"} + :kbd{value="⌥ Option"} + :kbd{value="D"}) to toggle the DevTools.
Restart your Nuxt server and open your app in browser. Click the Vite DevTools trigger at the bottom of the page (or press :kbd{value="Shift"} + :kbd{value="Alt"} / :kbd{value="⇧ Shift"} + :kbd{value="⌥ Option"} + :kbd{value="D"}) to toggle the DevTools. The first time, Vite DevTools asks you to authorize the browser with the code printed in your terminal.

### Opting in to v4.0
### Nuxt 4

Nuxt DevTools v4.0 is currently in alpha and requires Vite 8 — it integrates
with [Vite DevTools](https://github.com/vitejs/devtools), whose Code Server
dock only peers with Vite 8. Since Nuxt ships with a built-in version of
DevTools, you can opt-in to v4.0 by using package manager resolutions to
override the bundled version:

::code-group

```json [npm]
{
"overrides": {
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
```

```json [yarn]
{
"resolutions": {
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
```

```json [pnpm]
{
"pnpm": {
"overrides": {
"@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
}
}
}
```

::

Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
Nuxt 5 ships with Nuxt DevTools v4. Nuxt 4.5+ still bundles v3; override it to `^4.0.0` with your package manager as described in [Upgrading to v4](/guide/upgrading-to-v4#nuxt-45). Nuxt 4.0–4.4 ship Vite 7 and cannot run v4.

### Nightly Release Channel

Expand Down
16 changes: 0 additions & 16 deletions docs/content/1.guide/1.features.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,3 @@ Inspect expose the [`vite-plugin-inspect`](https://github.com/antfu/vite-plugin-
## Settings

Settings tab allows you to configure the DevTools to your needs. you can hide tabs, change tabs order, scale, theme and more...

## Nuxt Icon

Nuxt Icon is the first item on sidebar, located at the top left corner of the DevTools. It gives you a quick access to some useful features such as `Toggle Theme`, `Settings`, `Split Screen`, `Popup`, `Refresh Data`, `Refresh Page`. you can simply click on it and see the them yourself.

### Command Palette

Command Palette is a quick way to access some useful features of the DevTools such as easy navigation, run commands and Nuxt Documentations. You can open it with `Ctrl+K` or `Cmd+K` shortcut.

### Split Screen

Split Screen is a useful feature to use multiple tabs at the same time. You can open it from `Command Palette` or by clicking the `Nuxt Icon` in the top left corner of the DevTools and activate it from there.

### Popup

Popup is very useful for those who has a second screen, you can open it by clicking the `Nuxt Icon` in the top left corner of the DevTools and activate it from there.
140 changes: 140 additions & 0 deletions docs/content/1.guide/3.upgrading-to-v4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: Upgrading to v4
description: 'What changes for your app when you move from Nuxt DevTools v3 to v4.'
---

Nuxt DevTools v4 is built on [Vite DevTools](https://github.com/vitejs/devtools). Instead of shipping its own floating panel, it registers a `Nuxt` group inside the Vite DevTools panel, next to Vue DevTools, Vite Inspect, Terminals, Messages and the other tools your Vite plugins provide. Everything you know from the Nuxt side (Pages, Components, Imports, Modules, Server Routes, Timeline, …) lives in that group.

This page is for app developers. If you maintain a Nuxt module that integrates with DevTools, read the [module migration guide](/module/migration-v4) as well.

## Requirements

- **Vite 8.1.5 or later.** Vite DevTools only works with Vite 8.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- That means **Nuxt 4.5 or later**, or **Nuxt 5**. Nuxt 4.0–4.4 ship Vite 7 and cannot run DevTools v4.

If you are on an older Nuxt 4, upgrade Nuxt first. Overriding `vite` on Nuxt 4.4 to Vite 8 is not supported.

## Installing

### Nuxt 5

Nuxt 5 ships with DevTools v4. There is nothing to install:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
devtools: { enabled: true },
})
```

### Nuxt 4.5+

Nuxt 4 still bundles DevTools v3. Override the bundled version with your package manager, then reinstall:

::code-group

```json [npm]
{
"overrides": {
"@nuxt/devtools": "^4.0.0"
}
}
```

```json [yarn]
{
"resolutions": {
"@nuxt/devtools": "^4.0.0"
}
}
```

```json [pnpm]
{
"pnpm": {
"overrides": {
"@nuxt/devtools": "^4.0.0"
}
}
}
```

::

Remove your lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and run the install again so the override takes effect.

## Opening DevTools

The floating Nuxt button at the bottom of the page is gone; the Vite DevTools trigger takes its place. The keyboard shortcut is unchanged: :kbd{value="Shift"} + :kbd{value="Alt"} / :kbd{value="⇧ Shift"} + :kbd{value="⌥ Option"} + :kbd{value="D"} toggles the Nuxt entry.

Vite DevTools can run shell commands and read files on your machine, so it asks you to **authorize the browser once per project**. On first open you will see an _Unauthorized_ badge; enter the 6-digit code printed in your terminal (or click the link printed next to it). In sandboxed environments such as StackBlitz and CodeSandbox the prompt is skipped automatically. To skip it elsewhere, set `devtools.disableAuthorization: true` in `nuxt.config.ts` — only do this on a machine you trust.

To turn Vite DevTools off entirely (Nuxt DevTools included), disable it in your Vite config on Vite 8.3+:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
vite: {
devtools: false,
},
})
```

## What moved

| v3 | v4 |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| Floating Nuxt panel | `Nuxt` group in the Vite DevTools panel |
| Nuxt Options Viewer | **Data Inspector** → `Nuxt Application` source, with a live [jora](https://discoveryjs.github.io/jora/) query workbench |
| Terminals tab | Vite DevTools **Terminals** dock (shared with every tool) |
| Built-in VS Code integration (`devtools.vscode`) | **Code Server** dock (`devtools.codeServer`), see below |
| Vue DevTools tab | Vue DevTools dock, next to the `Nuxt` group (`vite-plugin-vue-devtools` v9) |
| Popup (Picture-in-Picture) and Split Screen | Removed; Vite DevTools owns the panel layout |
| `nuxi devtools enable/disable` | Removed; set `devtools.enabled` in `nuxt.config.ts` |

Module tabs contributed by Nuxt modules you install (for example `@nuxt/fonts`, `@nuxt/scripts`, `nuxt-og-image`) keep working. They appear in the `Nuxt` group under the _Modules_ category.

## Configuration changes

### `vscode` is replaced by `codeServer` {#code-server}

The VS Code integration is now the Code Server plugin. It supports a locally installed Coder [`code-server`](https://coder.com/docs/code-server/install), detected when DevTools starts and launched on demand.

```diff [nuxt.config.ts]
export default defineNuxtConfig({
devtools: {
- vscode: { enabled: true },
+ codeServer: { enabled: true },
},
})
```

The old `vscode` value is ignored and a `NDT_DEP_0008` warning is printed. The following v3 modes no longer exist:

- Microsoft `code serve-web` and `code-server serve-local`
- VS Code tunnels
- reusing an already running server, or starting one on boot
- the `vscode-server-controller` extension

The generic _open in editor_ action (from component and file links) is unaffected. `codeServer` accepts `enabled`, `bin`, `cwd`, `serverPort`, `host`, `args`, `env`, `cookieSuffix` and `startTimeout`.

### Removed options

- `viteDevTools` — Vite DevTools is always on; use `vite.devtools: false` to turn it off.
- `ui.showPanel` and `ui.minimizePanelInactive` — the floating panel no longer exists.
- `devtoolsGlobal` — DevTools cannot be installed globally any more.
- `experimental.timeline` — still honored, but use `timeline.enabled` instead.

### New options

- `vueDevTools` (default `true`) — set to `false` to skip the Vue DevTools dock.
- `dataInspector` (default `true`) — set to `false` to skip the Data Inspector source.
- `disableAuthorization` (default: on in sandboxes) — skips the authorization prompt described above.

## Deprecation warnings in your terminal

Lines such as `[NDT_DEP_0003] extendServerRpc is deprecated` come from a Nuxt module you installed, not from your app. The module keeps working; the warning tells its author which v4 API to move to. Each code links to the relevant section of the [module migration guide](/module/migration-v4), which is the right place to point the maintainer to.

## Troubleshooting

- **The dev server crashes at startup mentioning `@vitejs/devtools-rolldown`.** You are on Vite 7 (Nuxt ≤ 4.4). Upgrade to Nuxt 4.5 or later.
- **Opening `/__nuxt_devtools__/client/` directly shows empty data.** The client needs the connection the Vite DevTools panel gives it; open DevTools from the app page instead.
- **The authorization code does not appear.** It is printed by the dev server process; look in the terminal running `nuxt dev`, not in the browser console.
Loading
Loading