Closed zgoda closed 3 years ago
I don't use this feature, and in my first time using it, it seems to work fine. What if you remove src
from the webRoot?
Breakpoint is still unbound.
The same VSC launch configuration works for webpack projects with that kind of code layout.
Can you provide a reproducible example?
Minimal repro: https://github.com/zgoda/nollup-vsc-debug-cfg
This is basically Preact template with some minimal code to be able to set breakpoints, eg on line 10 in src/App.js
. https://github.com/zgoda/nollup-vsc-debug-cfg/blob/master/src/App.js#L10
Works fine for me. I've no idea what could be causing it to not work on your setup.
Oh wait, hang on, do you mean being able to set a breakpoint in the actual source code and have it bound there rather than in the loaded scripts section?
Can you try this?
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
"nollup://*": "${workspaceFolder}/*"
}
}
]
}
This is it, thank you very much!
A hole in memory, I once used that override with Snowpack or Vite.
A question: how do I set up VS Code launch configuration so internal debugger works with nollup based project?
My current config results in unbound breakpoints:
For reference, that's my Nollup rc file:
and Rollup bundling config: