If you are using Xcode 4, just expand the breakpoint panel on the left, click the plus sign at the bottom, and select Add Exception Breakpoint.
The breakpoint method is usually useful, in case the exception is CoreAnimation There are other things that can catch exceptions and perform their own operations.
Currently, CoreAnimation ignores exceptions during animation, so my assertion code does not work. How to make CoreAnimation in animation Do not ignore exceptions and stop program execution during debugging?
If your main goal is to pause the program when an exception is thrown, I recommend setting a breakpoint on objc_exception_throw. In Xcode 3.2, you can select Run under the menu “Stop on Objective-C Exceptions” to accomplish this. You can also do this: How to add a breakpoint to objc_exception_throw?
If you are using Xcode 4, just expand the left side In the breakpoint panel, click the plus sign at the bottom, and then select Add Exception Breakpoint.
The breakpoint method is usually useful, in case there are other things besides CoreAnimation that can catch exceptions and perform their own operations .