Re: XCode Debugger Breakpoint Question
Re: XCode Debugger Breakpoint Question
- Subject: Re: XCode Debugger Breakpoint Question
- From: Jens Alfke <email@hidden>
- Date: Tue, 26 Apr 2016 09:58:41 -0700
I have the “All Objective-C Exceptions” breakpoint enabled. I’m calling a third party method that calls into the Core Foundation layer and this causes an exception. The method handles the exception by using @catch and deals with the problem internally.
Yeah, this is a pain. I haven’t run into library code that does this with Obj-C exceptions, but Apple’s Security framework does it with C++ exceptions. It’s a bad idea because (a) throwing exceptions is expensive, (b) exceptions should be used for true failure conditions, not as flow control, and (c) it bollocks up exception breakpoints.
Can you fix the 3rd party framework to avoid triggering the exception? Or at least file a bug report? My problem is that it is causing the “All Objective-C Exceptions” to trigger which causes a hiccup in my App. I switched it off but now other real exceptions are being ignored too. Is there any way to set it up so that it doesn’t breakpoint on the ones in the Third Party Method but does breakpoint on all others?
The only thing I can think of would be to edit the breakpoint and use the ‘Add Action’ button to add some LLDB commands that will tell the debugger to continue if it’s in the 3rd party library. But my knowledge of LLDB commands is at the kindergarten level, so I can’t help you with that :(
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden