Nuxt

Set up debugger in a Nuxt project.

Last updated March 19, 2026

Nuxt

This guide covers adding debugger to a Nuxt project. The setup takes two steps.

Nuxt official docs

Feature Support
Server console Yes
Server errors Yes
HTTP requests Yes
Browser script injection Automatic

1. Add the Vite plugin

Update your Nuxt config:

// nuxt.config.ts
import { debuggerPlugin } from '@ephem-sh/debugger/vite'

export default defineNuxtConfig({
  vite: {
    plugins: [debuggerPlugin()],
  },
})

2. Add the Nitro plugin

Create server/plugins/debugger.ts:

export { default } from '@ephem-sh/debugger/nitro'

This handles browser log ingestion and script injection for Nuxt's SSR pipeline.

Verify

npm run dev
npx dbg status
pnpm dlx dbg status
bun x dbg status
yarn dlx dbg status
npx dbg browser console
pnpm dlx dbg browser console
bun x dbg browser console
yarn dlx dbg browser console

Production safety

The Vite plugin uses apply: 'serve' and is stripped from production builds. The Nitro plugin's render:html hook only injects scripts when the debugger is active.

Full example

See the complete working example at examples/node/nuxt.

Search Documentation

Search for pages and content