How to add a breakpoint to objc_exception_throw?

How to add a breakpoint to objc_exception_throw?

this was the answer from the brad larson on this SO question

If you add two breakpoints, you should be able to debug these exceptions. To do this, go to Run | Show | Breakpoints and create two global breakpoints (I do them globally because they are so useful in all my applications). The first should be named "objc_exception_throw" and its location should be "libobjc.A.dylib". The second should be "-[NSException raise]" and its location should be "CoreFoundation".

Now, if you start debugging your application with breakpoints enabled, it should break on the throw of these exceptions. You should then be able to see the chain of events that led to the exception within the debugger.

now in this answer i want to ask how do i add location mentioned???

Getting an iPhone app's product name at runtime?


declaring global variables in iPhone project
I think Brad's answer is pretty clear; hopefully this must guidance if you're not finding it clear.. Where's the difference between setObject:forKey: and setValue:forKey: in NSMutableDictionary? In Xcode, from the top menu click on Run > Show > Breakpoints. Why is my UIImageView blurred? A new window pops up.. SHowing Activity Indicator View Using Thread Shows This Error in gdb? Select "global breakpoints" in the left hand menu. Unable to push notifications to iPhone in .NET - .PEM certificate problem? There should be a box on the right under the "Breakpoint" column with the text "Double-Click for symbol". What's the difference between using obj-c accessors and using dot syntax? Single-click in this box and type in "objc_exception_throw".. UIWebView scrollBy replacement Then, single-click in the space next to "objc_exception_throw" under the "location" column. A box will appear for you to type in the location (in this case, "libobjc.A.dylib"). I've made a screenshot this will hopefully help:. alt text.


In Xcode 4 this great breakpoint must be added via "+" although ton on Breakpoints section (⌘ + 6). enter image description here.


I would also like to recommend adding the +[NSException raise:format:arguments:] breakpoint and its location should be CoreFoundation..


in Xcode 6 -- from top menu .
Debug > Breakpoints > Create Exception Breakpoint.

72 out of 100 based on 47 user ratings 1172 reviews