Static GitHub Issues

[2341] Possible to debug with breakpoints in Visual Studio Code?

prev: Unable to update CSS variable with document.documentElement.style.setProperty
next: npm run generate error

Attempting to debug SSR requests with VSCode on macOS is currently a pain. There are basically 4 places to check for errors:

  1. Browser screen when the error is caught and displayed
  2. Browser console
  3. Terminal
  4. VSCode debug tools

The pain arises from the fact that the error message could be on all, some, or none of these. My most fervent wish would be to use the editor debug mode with breakpoints, but current configuration does not make them usable (source maps not found):

{
	"type": "node",
	"request": "launch",
	"name": "launch nuxt",
	"protocol": "inspector",
	"program": "${workspaceRoot}/build/node_modules/.bin/nuxt",
	"cwd": "${workspaceFolder}/build"
}

Caveat: my repo has the Nuxt project in /build/ folder not at root.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2042">#c2042</a>)</em></sub></div>