dev*_*ree 15 debugging ios lldb
我正在尝试调试iOS应用程序,我在模拟器中遇到lldb问题.调用类方法似乎不起作用.实例方法工作正常.
(lldb) po Category
<no result>
(lldb) po [Category class]
error: Couldn't prepare the expression for execution in the target
(lldb) po self
(TagsTableViewController *) $5 = 0x085585a0 <TagsTableViewController: 0x85585a0>
Run Code Online (Sandbox Code Playgroud)
我已经尝试过4.3和5.1模拟器,但两者都表现出相同的问题.
在设备上进行调试时,一切正常.
ben*_*ord 19
这有效.感谢@devioustree在上面的评论中回答.
基本命令的结构如下:
po [(Class)objc_getClass("ClassName") class]
Run Code Online (Sandbox Code Playgroud)
要调用someClassMethodHere:
po [[(Class)objc_getClass("ClassName") class] someClassMethodHere]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2788 次 |
| 最近记录: |