Reveal调试UI工具的使用

在Commend命令行中,直接执行 vim ~/.lldbinit命令,将这个文件打开,输入下面语句

command alias reveal_load_sim expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);command alias reveal_load_dev expr (void*)dlopen([(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];

完成之后,ESC ,shift+:,wq保存退出。

然后在你的项目的AppDelegate的FinishLaunch函数中打一个断点,右击编辑这个断点,Action命令里面输入Debugger Command命令,reveal_load_sim/reveal_load_dev这两个命令中的一个,前面是模拟器后面是真机。启动起来之后在Reveal中就可以调试UI操作了。


另外可以在Reveal的标签栏的帮助栏中的show Reveal library in folder,找到Reveal.framework,将Reveal.framework引用到工程中,添加libz.dylib,然后修改Settings的other Link,添加 -ObjC。

直接运行工程,在Reveal里可以直接调试UI。

final!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值