View Full Version : XCode 4 Break on Exception

May 4, 2011, 12:26 PM
Hi all,

I have set a break on exception in XCode 4, but my problem is that the debugger breaks without telling me what line of code was the culprit. I can see the method names in the Debug Navigator, so for example I know the problem came from a call to [NSString substringFromIndex:] but there are a number of calls to that, and I have no idea which one causes the problem.

Any ideas on how to get XCode to actually indicate the break location?


May 4, 2011, 08:28 PM
Isn't the stack visible? If it is, follow it back to your code. It's probably in there.

I happen to have some code that is throwing an exception, and I can see the entire stack backtrace. Two kinds of entries show up, dark ones (which are your code) and light grey ones (which are not).

May 5, 2011, 04:53 AM
If u have a breakpoint, then u can see in the debugger, in Xcode 4 that's at the bottom, if it isn't there, expand the window a bit up, so it's visible.
Then if it breaks at the line, press continue.. and u can see the values, where it's exactly, and if it breaks, it should be visible too :)

regards, Noxx