iOS 内置 debug 工具, 欢迎使用和 star! - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
liman

iOS 内置 debug 工具, 欢迎使用和 star!

  •  
  •   liman Feb 13, 2018 2197 views
    This topic created in 2994 days ago, the information mentioned may be changed or developed.

    DebugMan

    https://github.com/liman123/DebugMan

    Debugger tool for iOS, support both Swift and Objective-C language.

    Introduction

    The author stole the idea from Dotzu JxbDebugTool SWHttpTrafficRecorder Sandboxer so that people can make crappy clones.

    DebugMan has the following features:

    • Display all app network http requests details, including SDKs and image preview.
    • Display app device informations and app identity informations.
    • Preview and share sandbox files on device/simulator.
    • Display all app logs in different colors as you like.
    • App memory real-time monitoring.
    • Display app crash logs.

    Requirements

    • iOS 8.0+
    • Xcode 9.0+
    • Swift 3.0+

    Installation

    Use CocoaPods to install DebugMan by adding it to your Podfile:

    platform :ios, '8.0' use_frameworks! target 'your_project' do pod 'DebugMan', :cOnfigurations=> ['Debug'] end 
    • ~> 3.x.x for Swift 3
    • ~> 4.x.x for Swift 4

    Usage

    //Swift #if DEBUG DebugMan.shared.enable() #endif //Objective-C #ifdef DEBUG [[DebugMan shared] enableWithServerURL:nil ignoredURLs:nil onlyURLs:nil tabBarControllers:nil recordCrash:YES]; #endif 

    For more advanced usage, check in demo.

    Screenshots

    Note

    Crash Reprting

    The collapse of the statistical functions collected should only be called once, if the third party is also best to use only a third party, so access to the collapse of the statistical information is also the only way. Third-party statistical tools are not used as much as possible, the use of multiple crashes to collect third-party will lead to malicious coverage of NSSetUncaughtExceptionHandler() function pointer, resulting in some third-party can not receive the crash information.

    • So, if you are using crash reporting SDKs like Crashlytics or Bugly, I recommend to close DebugMan crash reporting. For more, see code>DebugMan advanced usages.

    Other Tips

    • You can shake device/simulator to hide/show the black bubble.

    • When using DebugMan, app's key window is DebugMan's transparent window. You can check app's UI layout by Reveal.

    • If you want to get the root view controller for the app's key window, UIApplication.shared.keyWindow?.rootViewController may crash. You should use UIApplication.shared.delegate?.window??.rootViewController.

    • If you want to show a toast in app's key window, like MBProgressHUD SVProgressHUD, UIApplication.shared.keyWindow to get app's key window may cause toast invisible. You should use UIApplication.shared.delegate?.window.

    Contact

    Welcome to star and fork. If you have any questions, welcome to open issues.

    1 replies    2018-02-15 20:51:38 +08:00
    sangmong
        1
    sangmong  
       Feb 15, 2018
    滋瓷一下
    About     Help     Advertise     Blog     API     FAQ     Solana     3608 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 58ms UTC 04:44 PVG 12:44 LAX 21:44 JFK 00:44
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86