Why can't LLDB print view.bounds?

后端 未结 8 2107
离开以前
离开以前 2020-12-23 16:02

Things like this drive me crazy when debugging:

(lldb) p self.bounds
error: unsupported expression with unknown type
error: unsupported expression with unkno         


        
8条回答
  •  心在旅途
    2020-12-23 17:01

    LLDB does not support dot notation for message sending when using p and that's why

    p self.bounds
    

    doesn't work, but

    p [self bounds]
    

    does.

    (It actually supports it for objects when you use po, though)

    Also, LLDB doesn't have type information of non-objects available at runtime, so you need to explicitly provide a type by casting the return value.

提交回复
热议问题