Search code examples
objective-ccocoadebuggingxcode4breakpoints

Creating breakpoint in Xcode for unrecognized selector


Is it possible to set the breakpoint in Xcode to have the debugger stop only on unrecognized selector?

I have other exceptions that are triggering, and I only want to trigger on the unrecognized selector exception, nothing else.


Solution

  • Setting a symbolic breakpoint for -[NSObject doesNotRecognizeSelector:] should do the trick.

    In Xcode 4, press cmd+6 to go to the Breakpoint Navigator, then click the +and choose "Add Symbolic Breakpoint…". Configure.