Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the "All Exceptions" breakpoint for exceptions outside @try {} @catch {}?

In Xcode, you can go to the Breakpoints tab, then add a breakpoint for "All Exceptions".

I find this very helpful, but is it possible for this to break the program only when the exception is not handled by a @try {} @catch {} in my code? Those are the only ones that interest me.

It would be even nicer if I could select specific files where I'm interested in using this breakpoint system, although I'm guessing that's a bit too much to ask.

like image 866
Voldemort Avatar asked Oct 20 '13 05:10

Voldemort


1 Answers

The best I've found is breaking on abort; it will print the exception and backtrace in the log before breaking. You may also have luck setting your own unhandled exception handler and breaking on that.

If you really want to use All Exceptions the way you described, please file a bug with apple:

http://bugreport.apple.com

like image 103
Jacob Lukas Avatar answered Sep 24 '22 17:09

Jacob Lukas