kit
kit copied to clipboard
VSCode inline breakpoint debug is not working
Describe the bug
breakpoints added using VSCode UI are unbound, execution doesn't stop at them. However inline debugger statement works, but stops in transpiled js instead of my original typescript file:
Reproduction
- scaffold base sveltekit repo, use typescript
- follow steps from oficial guide https://kit.svelte.dev/docs/debugging#visual-studio-code-launch-via-debug-pane
- in
+layout.server.tsadd an inline breakpoint to line 5, execution should stop there when page is requested
Sample repository: https://github.com/ondrejrohon/sveltekit-debug-vscode
Logs
No response
System Info
Visual Studio Code
Version: 1.92.2
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin x64 23.6.0
Severity
annoyance
Additional Information
No response
now I noticed, that there is a warning icon in breakpoints section in debug tab. Question is, why VSCode can't find +layout.server.ts?
It might be a problem with the whitespace in your path. If I tried in a directory with space in the path the debugger stopped at the virtual file but when I removed the space it worked as expected. Can you confirm if this is the case? If so you should create an issue in vite. it might be the whitespace in the sourceURL needs to be escaped.
Yes, I confirm that removing the whitespace fixes the issue. Moving this issue to Vite: https://github.com/vitejs/vite/issues/17977
@jasonlyu123 thanks so much for help! :)