iOS纯代码UI调试工具-Reveal

2021-11-09  本文已影响0人  ___________枫林晚

下载地址(https://revealapp.com/download-thanks/

使用Reaveal连接模拟器调试

command alias reveal_loadsim 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];

该步骤其实是为lldb设置4个别名,这样方便后续操作。这4个别名的意义如下:

  1. reveal_load_sim 为模拟器加载reveal调试的动态链接库
  2. reveal_load_dev 为真机加载reveal调试用的动态链接库
  3. reveal_start 启动reveal调试功能
  4. reveal_stop 结束reveal调试功能
  1. 添加断点

  2. 编辑断点,点击add Action,输入reveal_load_sim

  3. 勾选Automatically continue after evaluating action


    截屏2021-11-09 下午4.48.42.png
  4. 运行模拟器,打开reveal,就可以在界面上左上角看到有模拟器可以连接调试,选择它,则可以在Reveal中查看调试该程序界面

真机调试

上一篇 下一篇

猜你喜欢

热点阅读