When I try to set a breakpoint and debug the file, the debugger just run the app without stopping at breakpoints. This is my code:
console.log('123');
And this is my output:
/usr/bin/node --debug-brk=39765 --nolazy index.js
debugger listening on port 39765
123
Process finished with exit code 0
Does anyone has an idea what could be the problem?
Try to disable js.debugger.v8.use.any.breakpoint in WebStorm registry.
You can do it by going to Help -> Find Action
In there just enter Registry.
For me disabling this option made debugging anything node-related much faster and much more predictable.
Wanted to chime in and say that it is absolutely critical that you use --debug-brk
and not --debug
with getting WebStorm breakpoints to work for remote debugging as well as running the server directly from webstorm.
Even though --debug-brk
technically just stops and waits for the debugger to join, and --debug
allows you to join later, my breakpoints failed with just --debug
no matter the remote configuration I tried.
As far as I can tell, connecting WebStorm 11 to a node.js server on the debug port, with only --debug
, will connect but fail to load any breakpoints that work.
Debug breakpoints not work in my PhpStorm 2016.3.2 with NodeJS 7.7.x. My expectation is, that WebStorm will have same issue.
If you downgrade to Node 6 (I tested with 6.9.4), it starts working correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With