Breakpoint for Objective-C exceptions

You can add a breakpoint for Objective-C exceptions in Xcode like this:

Switch to the breakpoint navigator (Cmd+7), press the “+” button in the lower left and “Add symbolic breakpoint…”. Then put symbol “objc_exception_throw” in module “libobj.A.dylib” like this:

Screen Shot 2013-12-11 at 13.55.47

By default, Xcode will only break on [NSException raise], which then in turn calls objc_exception_throw.

You can move this breakpoint to “global” by right clicking it and “Move breakpoint to –> User”.

Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.