You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: setting up source maps for server-side code #7320
The linked Vite issue (vitejs/vite#3288) has been closed.
The original example works, the debugger statement is presented in the source file by VSCode.
Despite following #7320 (comment), I could not get breakpoints to work within src/routes/+page.server.js@load.
The source maps appear in Chrome Dev tools when I manually add the repository to the "sources" workspace, but breakpoints in server-side files won't trigger. Not sure what I'm missing.
Activity
benmccann commentedon Oct 20, 2022
This is an issue in Vite: vitejs/vite#3288
giacomoran commentedon Jan 9, 2024
I think this issue can be closed.
The linked Vite issue (vitejs/vite#3288) has been closed.
The original example works, the
debuggerstatement is presented in the source file by VSCode.I've also created a skeleton SvelteKit project configured to generate and auto-load source maps: https://github.com/giacomoran/sveltekit-source-maps
benmccann commentedon Jul 2, 2024
It looks to me like @giacomoran was able to get this working with the following in
package.json:And the following in
vite.config.js:Perhaps we need to update https://kit.svelte.dev/docs/debugging with these steps
[-]source maps don't work on server-side code[/-][+]docs: setting up source maps for server-side code[/+]theetrain commentedon Jul 21, 2024
I added a demo: https://github.com/theetrain/7320-svelte-server-debugging
Despite following #7320 (comment), I could not get breakpoints to work within
src/routes/+page.server.js@load.The source maps appear in Chrome Dev tools when I manually add the repository to the "sources" workspace, but breakpoints in server-side files won't trigger. Not sure what I'm missing.
theetrain commentedon Jul 21, 2024
Scratch that, I forgot to add
--inspectand to launch the Node debugger, and it works! I can probably resolve this in the docs.