Post

使用Reveal进行断点调试查看UI

官网:https://www.waitsun.com/tag/reveal 其他地方下载: https://www.imacso.com/reveal.html https://www.xxmac.com/reveal.html

下载好Reveal安装好后,参考 https://support.revealapp.com/hc/en-us/articles/360022477972-Load-Reveal-Server-via-an-Xcode-Breakpoint 1、打开Reveal -> Help -> Install Debugger Commands image

2、打开要调试的项目 2.1 左下角+ -> Symbolic Breakpoint 2.2 配置断点 Symbol: UIApplicationMain Action: Debugger Command 命令:reveal load --autostart image

2.3 将断点移到User里 将断点移到 断点 -> 右键单击 -> Move Breakpoint To -> User image

运行后会报如下错误 error: 'reveal' is not a valid command. image

解决方式: 参考:https://support.revealapp.com/hc/en-us/articles/360022479872-Reveal-debugger-commands-are-not-recognized-by-the-debugger 在 ~/.lldbinit-Xcode文件里增加一行 command source ~/.lldbinit image

退出Reveal和Xcode,重新运行,生效 image

This post is licensed under CC BY 4.0 by the author.