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?
There is no such feature in WebStorm for now. Feel free to vote for the issue about that in our tracker.
Set a breakpoint at the start once JQuery has booted up and done most of its exception throwing.
In break on exception you can tell it to only start once it gets to that breakpoint.
The sweet spot is that you can right click on the breakpoint you've set and tell it not to suspend at that point.
(But agreed - it would be nicer if JQuery didn't throw exceptions as it goes about its normal business...)