Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugger lldb says my object is nil when is not ?

Recently I upgraded my project settings in Xcode 4.3 and now I use the latest llvm debugger: lldb

However (sometimes) I have the impression the debugger is not giving me the correct info? Could this be possible?

For example, The debugger says _documentsItem is nil (both in in the console and when mouse-over-ing the ivar). But I know it's NOT, that is why I can see it (an UIBarButtonItem) and more important that is why the app stopped at the shown breakpoint)

if (_documentsItem) { ...

In fact most of my properties return nil too :( Is there a way I make sure the debugger is doing fine?

po object

like image 635
nacho4d Avatar asked Feb 21 '23 09:02

nacho4d


2 Answers

I've met similar issues in Xcode 4.3. And press "Option" while click "run" and changed it back to stable gdb.

like image 159
nebulabox Avatar answered Feb 23 '23 22:02

nebulabox


It is definitely nil.

Look at the address that its been allocated. 0x00000 is nil.

like image 45
Jeremy Foo Avatar answered Feb 23 '23 22:02

Jeremy Foo