Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MaxFreud

macrumors newbie
Original poster
Jan 5, 2011
22
0
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?

Cheers,
Max
 
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).
 
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.