调试工具 - Reveal

1.在当前用户目录新建一个文件.lldbinit,位于~/.lldbinit,LLDB每次启动的时候都会加载这个文件。

2.在.lldbinit中输入如下内容(只能在模拟器使用):


command script import "~/Library/Application Support/Realm/rlm_lldb.py" --allow-reload

display @import UIKit

target stop-hook add -o "target stop-hook disable"

command script import /usr/local/opt/chisel/libexec/fblldb.py

command alias polayout po (id)[[UIWindow keyWindow] _autolayoutTrace]

command alias reveal_load expr (Class)NSClassFromString(@"IBARevealLoader") == nil ? (void *)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2) : ((void*)0)

command alias reveal_load_swift expr NSClassFromString("IBARevealLoader") == nil ? dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 2) : dlopen("", 0)

command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];

3.oc下在appdelegateload里面断点,输入“ reveal_load”,swift输入“ reveal_load_swift”

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容