I’d like to run my test suite in the debugger and break on any unexpected exception, but the Java classloaders throw lots of ClassNotFoundExceptions during normal operation.
So it would be nice if I could create an exception breakpoint that ignores ClassNotFoundExceptions and stops on everything else.
This answer is almost the same as that of Mindas, but the details were enough for me to ignore his suggestion the first time around, and bother the Intellij support guys/girls (thanks Serge and Eugene):
Activate only the ‘Condition’ Condition and type in the following:
IDEA will remove ‘java.lang’ immediately (version 11.01), but it is required for this solution to work. If you don’t use that, you will get a ClassNotFound popup box (irony oh irony).
I did find out that a lot of ‘standard’ libraries throw exceptions in their normal flow of operations. When you successfully ignore the ClassNotFoundException’s, you will find that others suddenly appear. Nothing is ever easy.