Reputation: 6459
So I know how to create a breakpoint for run-time exceptions in eclipse, in fact it's my standard policy to always have a breakpoints for all subclasses of RuntimeException within my package so I see the moment, and location, that any unexpected exception is thrown and can investigate my variable state before the exception get's propagated up.
The problem is that my current code has finally blocks everywhere, to release locks. Instead of breaking right where the exception is thrown, which would allow me to investigate memory state, instead I know break at the first finally block after the exception is thrown; which frankly is no help at all. How do I configure eclipse to actually break the moment that the exception is thrown rather then waiting for the finally block?
Upvotes: 1
Views: 439
Reputation: 7630
I know one way that do breakpoints on exceptions.
You can enable breakpoints in eclipse from
Window -> Show View -> Breakpoints
The tab there is a J!
that lets you set breakpoints on exceptions.
Upvotes: 1