我正在嘗試使用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要麼 –