Hacker News new | ask | show | jobs
by aqueueaqueue 470 days ago
But if that class is thrown again and again it is less useful which I see in a lot of codebases.

The go equivalent is "catch the exception when it happens here"

A debugger feature for that would be nice. I guess it is a debugger concern not an exceptions issue per se.

2 comments

Conditional breakpoints exist in Intellij and work well with Java in my experience. You craft a little boolean expression on the breakpoint that references variables in-scope, and the debugger skips the breakpoint unless the expression evaluates to true. Every time I've used this feature has been one of the darkest times of my life.
It also slows down execution so much. Agreed that it is a dark day if I'm forced to use that. If it's not in library code I just put the condition in an if and put the breakpoint inside it.
There is a `justMyCode` option even in VSC: https://code.visualstudio.com/docs/csharp/debugger-settings#...