reveal软件配置

来源:互联网 发布:apache启动后立即停止 编辑:程序博客网 时间:2024/06/07 16:58


首先打开Terminal,输入 vim ~/.lldbinit 创建一个名为.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];



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

1.reveal_load_sim 为模拟器加载reveal调试用的动态链接库

2.reveal_load_dev 为真机加载reveal调试用的动态链接库

3.reveal_start 启动reveal调试功能

4.reveal_stop 结束reveal调试功能


接下来,我们在AppDelegate类的 application: didFinishLaunchingWithOptions: 方法中,作如下3步操作:

1.点击该方法左边的行号区域,增加一个断点,之后右击该断点,选择“Edit Breakpoint”。

2.点击”Action”项边右的”Add Action”,然后输入“reveal_load_sim”(    reveal_load_sim)

3.勾选上Options上的”Automatically continue after evaluating”选项。

 

之后我们运行模拟器,然后打开Reveal,就可以在Reveal界面的左上角,看到有模拟器可以连接调试,选择它,则可以在Reveal中查看和调试该iOS程序的界面了。

0 0
原创粉丝点击