LLDB调试过程中经常碰到这样的问题

直接p不出来东西来,需要经过强制的类型转换才行,每次都觉得麻烦。
有没有简便的方法。
方法一
在p之前expr @import UIKit

就很顺利的P出来。
方法二
方法一挺方便,但是每次工程重启之后,又要再添加一次,有没有一劳永逸的办法呢?
不用每次都要expr @import UIKit
可以通过创建一个特定的符号断点,比如:UIApplicationMain(随便起的名字)

在工程运行过程中要将符号断点打开。

然后就直接P出来,不需要其它步骤了。使用符号断点不仅工程重启之后依旧有效而且还能应用在所有其它项目工程中。
网友评论