#1524·cli

`nuxi dev --inspect` incorrect behavior (impossible to inspect nitro-runtime, server functions, middlewares and so on)

Author: IrelynxCreated Jul 15, 2024Updated Sep 6, 2026
Labelsnitro

Environment


  • Operating System: Windows_NT
  • Node Version: v22.3.0
  • Nuxt Version: 3.12.3
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: debug, compatibilityDate, devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  • Create new nuxt project (nuxi create test)
  • add file: server/api/test.get.ts
    typescript
    export default defineEventHandler(async (event) => {
      console.log('request!');
      debugger;
      return { ok: true };
    });
  • enable debug messages in nuxt.config.ts
    typescript
    // https://nuxt.com/docs/api/configuration/nuxt-config
    export default defineNuxtConfig({
      debug: true,
      compatibilityDate: '2024-04-03',
      devtools: { enabled: true }
    })
  • run in dev mode with --inspect flag (nuxi dev --inspect)
  • open Chrome DevTools and connect to process
  • when nuxt finish warming up, do the following HTTP request: GET /api/test (res = await fetch('/api/test', { method: 'GET' }))
  • check console - you will see the logs
  • check DevTools - you will NOT see any logs after [nitro] dev:reload, debugger keyword will not trigger debugging as well. Sources tab doesn't contain any project files (except some dependencies from node_modules) image

Describe the bug

The bug is inability to inspect/debug what is going on inside server-side functions (endpoints), middlewares, pages rendering (debugger keyword in pages/components/composables/...).

Additional context

Possible reference: #21312 (i didn't find solution there)

Logs

shell-script
(please see attached screenshot in Reproduction section)