Jackson Tale
Jackson Tale

Reputation: 25842

Xcode - How can I get more detailed information about exceptions/stack trace?

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

Answers (1)

pawelropa
pawelropa

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. screenshot1

And add exception breakpoint, then done. enter image description here That should be it.

Upvotes: 4

Related Questions