Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break on Exception debugging with WebStorm and Node JS

I'm debugging a node application with Webstorm and want to use the 'Break on Exception' option so that I don't have to continuously press 'step into' dozens of times before finding the exact source of the error I'm trying to solve.

The problem is that when I set 'Break on Exception' to 'on', it then catches all sorts of exceptions from within node itself long before getting to my code. I was able to use 'Run to Cursor' to skip node errors that occur on startup, but that didn't help much because it seems many errors are thrown and caught inside node itself during execution.

How can I use 'Break on Exception' only for exceptions that are thrown directly by my code?

like image 960
Trindaz Avatar asked Apr 23 '12 19:04

Trindaz


2 Answers

It works fine for me:

"Run -> View Breakpoints... -> JS Any exception -> Enabled & Suspend & Uncaught only".

like image 199
odinmillion Avatar answered Oct 11 '22 21:10

odinmillion


There is no such feature in WebStorm for now. Feel free to vote for the issue about that in our tracker.

like image 28
Nik Avatar answered Oct 11 '22 21:10

Nik