Debug Server Side code using --inspect
See original GitHub issueIt would be nice to have an option to enable node debugging for server-side code to be able to stop on breakpoints inspect variables and etc.
Proposed syntaxis is:
svelte-kit dev --inspect
Currently, it’s possible to start debugger using:
"dev": "NODE_OPTIONS=\"--inspect\" svelte-kit dev"
This enables inspecting and i successfully connected to the nodejs using Chrome Dev Tools. But looks like server-side code generated without source maps and it makes it impossible to put breakpoints inside IDE such as Vs Code or Webstorm (they just ignore breakpoints and execute code without stop).
So when --inspect option is set we should pass through this flag to nodejs and enable sourcemaps in all transpilers/vite
Issue Analytics
- State:
- Created 2 years ago
- Reactions:53
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How To: Debugging server-side code · Reaction Docs
Inspecting in Webstorm · Select your breakpoints by clicking along the left-hand side line numbers. · Click on the Debug icon to start...
Read more >Testing and Debugging your Local Backend | Mobify DevCenter
Using ssr:inspect to debug with breakpoints. With a simple command, you can use Chrome DevTools to debug the local backend of your server-side...
Read more >6 Server-Side Debugging Tips That Make Developing Easier
Check out these six tips for ways to improve your server-side debugging with ASP.NET.
Read more >Debugging - Getting Started - Node.js
When started with the --inspect switch, a Node.js process listens for a debugging client. By default, it will listen at host and port...
Read more >How to Debug Server Side Rendering - Bitovi
If you've run donejs add vscode , you'll see a .vscode folder with a launch.json file inside, which means you're ready to start...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know it’s normally not very nice to add a comment about +1. But I must emphasize how absolute critical debugging is for the developer experience. @thekip is there something I can help with to help with this?
Debugging with “debugger;” statements was always possible, problem with debugging using breakpoints in ide. The main benefit of IDE breakpoints vs “debugger;” statements you don’t need to stop and rebuild/reload current file and don’t loose a debugging context.