Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find instance by hex in XCode console?

When I bring up console after my iPhone app crashes, it often says "unrecognized selector sent to instance 0x blah blah blah." How can I find out what variable this is? Is there a way in the debugger? Is it even possible? Thanks.

like image 536
marty Avatar asked Aug 04 '10 08:08

marty


1 Answers

In gdb you could type

po 0x12345678

to print the -description of the object at that address. But this info is seldom useful. You should instead check the backtrace of the exception first, which can locate the line of code that causes the problem.

like image 70
kennytm Avatar answered Sep 29 '22 23:09

kennytm