Related #362
After enabling sourcemap for vite (see below), I can consistently hit breakpoints, and their locations will be resolved correctly.
export default defineConfig({
plugins: [sveltekit()], // svelte specific stuff, your config might be different
build: {
sourcemap: true
}
});
However, once I rebuild the project (via vite dev), breakpoints are no longer hit. No wrong locations, no phantom breakpoints, just not hit at all.
I do wanna stress that rebuilding is something that happens constantly during development, so it should be supported (if possible).
After some investigation, I found out that vite appends a timestamp to the sources (and it also keeps old copies), which can be seen in FF's debugger (screenshot below):

I wonder if it's related?
More info
Launch config:
The same issue happens on neovim and vscode, so it's not client-side related.
Related #362
After enabling
sourcemapforvite(see below), I can consistently hit breakpoints, and their locations will be resolved correctly.However, once I rebuild the project (via
vite dev), breakpoints are no longer hit. No wrong locations, no phantom breakpoints, just not hit at all.I do wanna stress that rebuilding is something that happens constantly during development, so it should be supported (if possible).
After some investigation, I found out that
viteappends a timestamp to the sources (and it also keeps old copies), which can be seen in FF's debugger (screenshot below):I wonder if it's related?
More info
Launch config:
{ "name": "Launch Firefox", "type": "firefox", "suggestPathMappingWizard": true, "reAttach": true, "request": "launch", "url": "http://localhost:5173/", "webRoot": "${workspaceFolder}" }The same issue happens on neovim and vscode, so it's not client-side related.