Debugger lldb says my object is nil when is not ?

2019-01-26 17:12发布

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

4条回答
Anthone
2楼-- · 2019-01-26 17:42

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

查看更多
女痞
3楼-- · 2019-01-26 17:43

This is a bug with XCode, which still hasn't been resolved, as of 4.3.2. Switch back to GDB, even if XCode complains about your project settings.

查看更多
聊天终结者
4楼-- · 2019-01-26 18:01

It is definitely nil.

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

查看更多
Deceive 欺骗
5楼-- · 2019-01-26 18:03

For view property value, use "po self.yourproperty"

查看更多
登录 后发表回答