Node.js debugger breakpoints misaligned
Hi all,
I'm very familiar with debugging Java code, but I'm having a hard time getting started with node and WebStorm. I started my back end api application in debugging mode to in the beginning, but once I messed around with the code, switched back and fourth different branches in git, the code seems to be out of sync with the debugger. Debugger stops a few (sometimes several) lines before or after the actual breakpoint location. In IntelliJ / Java, a good old "rebuild" project would solve this. But with node application there is no such option because, well... it's node. Any clues?
I have zero experience with node. I was trying to get started on it using webstorm hoping the pain would be less given my familiarity with IntelliJ, but looks like it's causing more confusion.
Please sign in to leave a comment.
If the breakpoints get misaligned as a result of code changes made during debugging, restarting the debug session usually helps. Otherwise it must be an issue with sourcemaps. What does your backend app look like? Do you build it in any way (transpile/minify/beautify/merge/etc.)?