我正在尝试使用lldb调试我的iOS应用程序,并且在调试时出现了很奇怪的错误。lldb错误:在类型对象上找不到属性
我的断点前几行,我有:
CGRect frame = view.frame;
,我可以用在LLDB print frame
命令没有问题访问。然而,当我尝试在LLDB再次访问框架,I型print view.frame
并得到以下错误:
error: property 'frame' not found on object of type 'UIView *'
这是没有意义的,因为我可以验证view
是UIView*
实例并具有称为帧有效的属性通过键入po view
并得到正确的结果:
(UIView *) $4 = 0x1e199bf0 <MyAppCustomView: 0x1e199bf0; frame = (3398 3396; 204 208); layer = <CALayer: 0x1e199ce0>>
这种特殊LLDB错误发生在我身上很多,我可以找不到此错误的原因。有人建议在Property 'count' not found on object of type 'NSMutableArray *' PO command in lldb,可以使用gdb作为(gdb) p view.frame
,但我得到error: '(gdb)' is not a valid command.
,我高度怀疑gdb命令会“工作?”无论如何,在另一个调试器内。
任何有关此错误随机出现的建议或解决方法?
打印[图幅] –
已经尝试过:错误:没有已知的方法 '-frame';将该消息发送到方法的返回类型 –
print [(UIView *)view frame] does not work要么 –