Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 364
AWF4vk Avatar asked Aug 23 '11 03:08

AWF4vk


People also ask

How do you add a breakpoint in Xcode?

Navigate to a line in your code where you want execution to pause, then click the gutter or line number in the source editor to set a breakpoint. Xcode displays a breakpoint icon to indicate the location. Drag a breakpoint up or down to move it to another location; drag it away from the gutter to remove it.

What is exception breakpoint in Xcode?

An exception breakpoint is a type of breakpoint that is created when some exception occurs in the code. On occurrence of such exception our application stops at that given condition causing the exception and we can access all variables in scope at that breakpoint.

What is symbolic breakpoint in Xcode?

It allows you to add a symbolic breakpoint which will halt the execution at a specific point so that you can backtrack and start investigating into where this method call was triggered.

What is a breakpoint Swift?

Swift version: 5.6. Breakpoints are locations in your code where Xcode will pause so that you can inspect the state of your program. They don't have any impact on the final performance of your code – in fact, they don't even exist in your code at all – so there's no harm using them liberally.


1 Answers

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.

like image 193
justin Avatar answered Sep 18 '22 15:09

justin