Home

Awesome

<p align="center" >  <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/header.png" alt="LLDebugTool" title="LLDebugTool"> </p>

Version CocoaPods Compatible Carthage Compatible Platform License Language Twitter

Introduction

点击查看中文简介

LLDebugTool is a debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations.

LLDebugToolSwift is the extension of LLDebugTool, it provide swift interface for LLDebugTool, LLDebugToolSwift will release with LLDebugTool at same time.

If your project is a Objective-C project, you can use LLDebugTool, if your project is a Swift project or contains swift files, you can use LLDebugToolSwift.

Choose LLDebugTool for your next project, or migrate over your existing projects—you'll be happy you did! 🎊🎊🎊

Gif

<div align="left"> <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/screenGif.gif" width="18%"></img> <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/ScreenGif-Screenshot.gif" width="18%"></img> <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/ScreenGif-Screenshot2.gif" width="18%"></img> <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/ScreenGif-Screenshot3.gif" width="18%"></img> <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/ScreenGif-Screenshot4.gif" width="18%"></img> </div>

Preview

<div align="left"> <img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/ScreenShot-3.png" width="18%"> </img> </div>

What's new in 1.3.8.1

<img src="https://raw.githubusercontent.com/HDB-Li/HDBImageRepository/master/LLDebugTool/ScreenGif-Screenshot4.gif" width="20%"></img>

Remove auto check version.

What can you do with LLDebugTool?

Adding LLDebugTool to your project

CocoaPods

CocoaPods is the recommended way to add LLDebugTool to your project.

Objective - C
  1. Add a pod entry for LLDebugTool to your Podfile pod 'LLDebugTool' , '~> 1.0'.
  2. If only you want to use it only in Debug mode, Add a pod entry for LLDebugTool to your Podfile pod 'LLDebugTool' , '~> 1.0' ,:configurations => ['Debug'], Details also see Wiki/Use in Debug environment. If you want to specify the version, use as pod 'LLDebugTool' , '1.3.8.1' ,:configurations => ['Debug'].
  3. The recommended approach is to use multiple targets and only add pod 'LLDebugTool', '~> 1.0' to Debug Target. This has the advantage of not contamiling the code in the Product environment and can be integrated into the App in the Archive Debug environment (if :configurations => ['Debug'], it can only run through XCode. It is not possible to Archive as an App).
  4. Install the pod(s) by running pod install. If you can't search LLDebugTool or you can't find the newest release version, running pod repo update before pod install.
  5. Include LLDebugTool wherever you need it with #import "LLDebug.h" or you can write #import "LLDebug.h" in your .pch in your .pch file.
Swift
  1. Add a pod entry for LLDebugToolSwift to your Podfile pod 'LLDebugToolSwift' , '~> 1.0'.
  2. If only you want to use it only in Debug mode, Add a pod entry for LLDebugToolSwift to your Podfile pod 'LLDebugToolSwift' , '~> 1.0' ,:configurations => ['Debug'], Details also see Wiki/Use in Debug environment. If you want to specify the version, use as pod 'LLDebugToolSwift' , '1.3.8.1' ,:configurations => ['Debug'].
  3. The recommended approach is to use multiple targets and only add pod 'LLDebugToolSwift', '~> 1.0' to Debug Target. This has the advantage of not contamiling the code in the Product environment and can be integrated into the App in the Archive Debug environment (if :configurations => ['Debug'], it can only run through XCode. It is not possible to Archive as an App).
  4. Must be added in the Podfile use_frameworks!.
  5. Install the pod(s) by running pod install. If you can't search LLDebugToolSwift or you can't find the newest release version, running pod repo update before pod install.
  6. Include LLDebugTool wherever you need it with import "LLDebugToolSwift.

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

Objective - C
  1. To integrate LLDebugTool into your Xcode project using Carthage, specify it in your Cartfile:

    github "LLDebugTool"

  2. Run carthage to build the framework and drag the built LLDebugTool.framework into your Xcode project.

Swift
  1. To integrate LLDebugToolSwift into your Xcode project using Carthage, specify it in your Cartfile:

    github "LLDebugToolSwift"

  2. Run carthage to build the framework and drag the built LLDebugToolSwift.framework into your Xcode project.

Source files

Alternatively you can directly add the source folder named LLDebugTool. to your project.

Objective - C
  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Open your project in Xcode, then drag and drop the source folder named LLDebugTool. When you are prompted to "Choose options for adding these files", be sure to check the "Copy items if needed".
  3. Integrated FMDB to your project,FMDB is an Objective-C wrapper around SQLite.
  4. Integrated Masonry to your project, Masonry is an Objective-C constraint library. There are no specific version requirements, but it is recommended that you use the latest version.
  5. Include LLDebugTool wherever you need it with #import "LLDebug.h" or you can write #import "LLDebug.h" in your .pch in your .pch file.
Swift
  1. Download the LLDebugTool latest code version or add the repository as a git submodule to your git-tracked project.
  2. Download the LLDebugToolSwift latest code version or add the repository as a git submodule to your git-tracked project.
  3. Open your project in Xcode, then drag and drop the source folder named LLDebugTool and LLDebugToolSwift. When you are prompted to "Choose options for adding these files", be sure to check the "Copy items if needed".
  4. Integrated FMDB to your project,FMDB is an Objective-C wrapper around SQLite.
  5. Integrated Masonry to your project, Masonry is an Objective-C constraint library. There are no specific version requirements, but it is recommended that you use the latest version.
  6. Include LLDebugTool wherever you need it with import LLDebugToolSwift".

Usage

Get Started

You need to start LLDebugTool at "application:(UIApplication * )application didFinishLaunchingWithOptions:(NSDictionary * )launchOptions", Otherwise you will lose some information.

If you want to configure some parameters, must configure before "startWorking". More config details see LLConfig.h.

In Objective-C

#import "AppDelegate.h"
#import "LLDebug.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // The default color configuration is green background and white text color. 

    // Start working.
    [[LLDebugTool sharedTool] startWorking];
    
    // Write your project code here.
    return YES;
}

In Swift

import LLDebugToolSwift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // ####################### Start LLDebugTool #######################//
        // Use this line to start working.
        LLDebugTool.shared().startWorking()
        
        // Write your project code here.
        
        return true
    }

In Objective-C

#import "AppDelegate.h"
#import "LLDebug.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Start working with config.
    [[LLDebugTool sharedTool] startWorkingWithConfigBlock:^(LLConfig * _Nonnull config) {

        //####################### Color Style #######################//
        // Uncomment one of the following lines to change the color configuration.
        // config.colorStyle = LLConfigColorStyleSystem;
        // [config configBackgroundColor:[UIColor orangeColor] primaryColor:[UIColor whiteColor] statusBarStyle:UIStatusBarStyleDefault];

        //####################### User Identity #######################//
        // Use this line to tag user. More config please see "LLConfig.h".
        config.userIdentity = @"Miss L";

        //####################### Window Style #######################//
        // Uncomment one of the following lines to change the window style.
        // config.entryWindowStyle = LLConfigEntryWindowStyleNetBar;

    }];

    return YES;
}

In Swift

import LLDebugToolSwift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        
        // Start working with config.
        LLDebugTool.shared().startWorking { (config) in
            //####################### Color Style #######################//
            // Uncomment one of the following lines to change the color configuration.
            // config.colorStyle = .system
            // config.configBackgroundColor(.orange, textColor: .white, statusBarStyle: .default)
        
            //####################### User Identity #######################//
            // Use this line to tag user. More config please see "LLConfig.h".
            config.userIdentity = "Miss L";
        
            //####################### Window Style #######################//
            // Uncomment one of the following lines to change the window style.
            // config.windowStyle = .netBar
        
            //####################### Features #######################//
            // Uncomment this line to change the available features.
            // config.availables = .noneAppInfo
        }
        
        return true
    }

Network Request

You don't need to do anything, just call the "startWorking" will monitoring most of network requests, including the use of NSURLSession, NSURLConnection and AFNetworking. If you find that you can't be monitored in some cases, please open an issue and tell me.

Log

Print and save a log. More log macros details see LLDebugToolMacros.h.

In Objective-C

#import "LLDebug.h"

- (void)testNormalLog {
    // Insert an LLog where you want to print.
    LLog(@"Message you want to save or print.");
}

In Swift

import LLDebugToolSwift

    func testNormalLog() {
        // Insert an LLog where you want to print.
        LLog.log(message: "Message you want to save or print.")
    }

In Objective-C

#import "LLDebug.h"

- (void)testEventErrorLog {
    // Insert an LLog_Error_Event where you want to print an event and level log.
    LLog_Error_Event(@"The event that you want to mark. such as bugA, taskB or processC.",@"Message you want to save or print.");
}

In Swift

import LLDebugToolSwift

    func testEventErrorLog() {
        // Insert an LLog_Error_Event where you want to print an event and level log.
        LLog.errorLog(message: "Message you want to save or print.", event: "The event that you want to mark. such as bugA, taskB or processC.")
    }

Crash

You don't need to do anything, just call the "startWorking" to intercept the crash, store crash information, cause and stack informations, and also store the network requests and log informations at the this time.

AppInfo

LLDebugTool monitors the app's CPU, memory, and FPS. At the same time, you can also quickly check the various information of the app.

Sandbox

LLDebugTool provides a quick way to view and manipulate sandbox, you can easily delete the files/folders inside the sandbox, or you can share files/folders by airdrop elsewhere. As long as apple supports this file format, you can preview the files directly in LLDebugTool.

Screenshots

LLDebugTool provides a screenshot and allows for simple painting and marking that can be easily recorded during testing or while the UI designers debugs the App.

Hierarchy

LLDebugTool provides a view structure tool for viewing or modify elements' properties and information in non-debug mode.

Magnifier

LLDebugTool provides a magnify tool for magnifying local uis and viewing color values at specified pixel.

Ruler

LLDebugTool provides a convenient tools to display touch point information.

Widget Border

LLDebugTool provides a function to display element border, convenient to see the view's frame.

HTML

LLDebugTool can debug HTML pages through WKWebView, UIWebView or your customized ViewController in your app at any time.

Location

LLDebugTool provides a function to mock location at anytime.

More Usage

Requirements

LLDebugTool works on iOS 8+ and requires ARC to build. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

Architecture

Communication

Contact

Change-log

A brief summary of each LLDebugTool release can be found in the CHANGELOG.

License

This code is distributed under the terms and conditions of the MIT license.