Reputation: 25842
Can I know how do you guys debug in Xcode?
Each time my iphone app gives an exception, such as
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]' * First throw call stack: (0x1b48022 0x183dcd6 0x1b34644 0xf37a 0xb5f7 0x1b49e42 0x4fe5b 0x1b49e42 0x12c69df 0x1b1c94f 0x1a7fb43 0x1a7f424 0x1a7ed84 0x1a7ec9b 0x22c57d8 0x22c588a 0x9a0626 0x715d 0x1fe5) terminate called throwing an exception
I don't get a clue where exactly is wrong.
In Eclipse or Java programming, Java gives the stack of the exception which clearly indicates the place of error.
How can I get stack of calls in Xcode?
Thanks
Upvotes: 1
Views: 372
Reputation: 1439
You can add breakpoint before exception is thrown. First go to Breakpoint Navigator (cmd + 6). In the bottom left corner mouse click plus button.
And add exception breakpoint, then done.
That should be it.
Upvotes: 4