zoukankan      html  css  js  c++  java
  • 界面调试工具Reveal的使用介绍

    Reveal


    注: 此处介绍Reveal,当中大部分内容来自于唐巧的《iOS开发进阶》一书。以此说明。


    怎样使用Reveal进行模拟器调试。仅仅需进行下面三个步骤就可以。


    1. 创建.lldbinit文件


    vim ~/.lldbinit


    2. 输入下面内容,创建别名


    	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];



    当中各个别名的含义:

    •  `reveal_load_sim` 为模拟器载入reveal调试用的动态链接库
    •  `reveal_load_dev` 为真机载入
    •  `reveal_start` 启动reveal调试功能
    • *`reveal_stop` 结束reveal调试功能


    3. 添加断点

    定位到AppDelegate类中的`application:didFinishLaunchingWithOptions:`方法,进行下面三个步骤:
    1. 添加一个断点,右键单击断点,选择`Edit Breakpoint`
    2. 单击`Action`。然后输入`reveal_load_sim`
    3. 勾选上`Options`上的 `Automatically continue after evaluating`






  • 相关阅读:
    Linux双线双网卡双IP双网关设置方法
    Docker 清理命令集锦
    Centos7安装Docker 基于Dockerfile 搭建httpd运行环境
    Centos6.x 安装vnc
    KVM虚拟化技术
    ELK监控系统nginx / mysql慢日志
    ELK初学搭建(elasticsearch)
    (转)Linux 磁盘IO性能测试
    hadoop2.9.2 调整jvm
    (转)shell调试方法
  • 原文地址:https://www.cnblogs.com/gavanwanggw/p/6937383.html
Copyright © 2011-2022 走看看