I found it nearly impossible to debug my own code (especially related to AVFoundation & CoreMedia) with breakpoints due to huge number of breakpoints in this frameworks made by apple. Frequently I need to step over about 15-20 sequential frameworks breakpoints (such as com.apple.coremedia.player.async (193): breakpoint 5.2) which are referred to some assembler code in order to finally continue app execution. I was wondering, is there any way to disable apple's frameworks breakpoints, so xcode will stop only on mine breakpoints?
When working with AVFoundation and CoreMedia I had the same problem because the system fires several exceptions (for example when the playback of a sound ends).
The way I fix it without losing the ability do debug my code is changing my Exception breakpoint Exception type to Objective-C only
.
When the exceptions are from Objective-C I use the solution provided in this SO answer.
In the breakpoint Navigator disable the "All Exceptions" breakpoint.
Additionally by double clicking on the breakpoint it is possible to configure its action.
As an exception to Apple's admonition not to use exceptions for program control Apple has done that in some frameworks, most notably Core Data. These can cause problems for developers if "All Exceptions" is enabled.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.