Skip to content

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

Description

@Irelynx

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: pnpm@9.3.0
  • 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
    export default defineEventHandler(async (event) => {
      console.log('request!');
      debugger;
      return { ok: true };
    });
  • enable debug messages in nuxt.config.ts
    // 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

(please see attached screenshot in Reproduction section)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions