docs: add how to debug nuxt with node inspector (#25731)

This commit is contained in:
João Carmona 2024-02-12 21:19:55 +01:00 committed by GitHub
parent 18063b251c
commit 75f05e95f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,6 +17,19 @@ export default defineNuxtConfig({
}) })
``` ```
## Debugging with Node Inspector
You can use [Node inspector](https://nodejs.org/en/learn/getting-started/debugging) to debug Nuxt server-side.
```bash
nuxi dev --inspect
```
This will start Nuxt in `dev` mode with debugger active. If everything is working correctly a Node.js icon will appear on your Chrome DevTools and you can attach to the debugger.
::callout{color="amber" icon="i-ph-warning-duotone"}
Note that the Node.js and Chrome processes need to be run on the same platform. This doesn't work inside of Docker.
::
## Debugging in Your IDE ## Debugging in Your IDE
It is possible to debug your Nuxt app in your IDE while you are developing it. It is possible to debug your Nuxt app in your IDE while you are developing it.