LLDebugTool-Convenient IOS debugging tool (support componentization)

LLDebugTool-Convenient IOS debugging tool (support componentization)

 

LLDebugTool is a debugging tool for developers and testers. It can help you perform data analysis and operations without Xcode.

LLDebugToolSwift is a Swift extension for LLDebugTool . It provides the Swift interface of LLDebugTool. LLDebugToolSwift will be updated synchronously with LLDebugTool.

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

Choose LLDebugTool for your next project, or migrate to your existing project-you will be pleasantly surprised!

Gif

ScreenShots

Recently updated (1.2.0)

Support componentization.

LLDebugToolComponentization is now supported. Now you can integrate one or more modules into your own Debug tool . You can directly use the view controller contained in each module, or just call Functionthe functions under the folder, and then build the UI yourself.

How to use componentization, please see Wiki using componentization or add LLDebugTool to your project .

More modifications can be found in Version 1.2.0 Project .

Add

  • Increased LLRouteto resolve mutual references between components. When the relevant component exists, the LLRouterelevant method will be called, otherwise nothing will be done.

Update

  • Update the folder catalog. Now the whole project is classified according to components, and under each component folder, it is divided into Functionand UserInterface.

  • Modify the files that refer to each other between the components to be handled by Route instead.

  • Updated NSURLSessionConfiguration.m, hook up protocolClassesthis method.

What can I use LLDebugTool for?

  • Check the network request or view the log information of certain events without running under XCode. This is useful in solving testers' problems.

  • Filter useful information more easily.

  • Deal with occasional problems more easily.

  • Analyze the cause of the crash more easily.

  • Easier to share, preview or delete sandbox files, which is very useful in the development phase.

  • Observe the CPU, memory, FPS and other information of the App more easily.

Add LLDebugTool to your project

CocoaPods

CocoaPods is LLDebugToolthe preferred method of integration .

Objective-C
  1. Add pod 'LLDebugTool' , '~> 1.0.0'to your Podfile years. If you only want to use it in Debug mode, add it pod 'LLDebugTool' , '~> 1.0.0' ,:configurations => ['Debug']to your Podfile. For detailed configuration methods, please refer to Wiki/How to use it only in Debug environment . If you want to specify a certain version, you can use it like this pod 'LLDebugTool' , '1.1.7' ,:configurations => ['Debug'].
  2. Terminal input pod installfor integration. If LLDebugToolyou cannot search or find the latest version, you can run it first pod repo updateand then execute it pod install.
  3. Add it to the file you need to use LLDebugTool #import "LLDebug.h", or add it directly to the pch file #import "LLDebug.h".
Swift
  1. Add pod 'LLDebugToolSwift' , '~> 1.0.0'to your Podfile years. If you only want to use it in Debug mode, add it pod 'LLDebugToolSwift' , '~> 1.0.0' ,:configurations => ['Debug']to your Podfile. For detailed configuration methods, please refer to Wiki/How to use it only in Debug environment . If you want to specify a certain version, you can use it like this pod 'LLDebugToolSwift' , '1.1.7' ,:configurations => ['Debug'].
  2. Must be added in Podfile use_frameworks!.
  3. Terminal input pod installfor integration. If LLDebugToolSwiftyou cannot search or find the latest version, you can run it first pod repo updateand then execute it pod install.
  4. Add in the file you need to use LLDebugTool import LLDebugToolSwift.

Carthage

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

Objective-C
  1. To use Carthage to integrate LLDebugTool into an Xcode project, please Cartfilespecify it in:

    github "LLDebugTool"

  2. Run carthageto build the framework, and built LLDebugTool.frameworkonto the Xcode project.

Swift
  1. To use Carthage to integrate LLDebugToolSwift into an Xcode project, please Cartfilespecify it in:

    github "LLDebugToolSwift"

  2. Run carthageto build the framework, and built LLDebugToolSwift.frameworkonto the Xcode project.

Source File

You can directly add the source file named LLDebugTool folder to the project.

Objective-C
  1. Download the latest code version or add the repository as a git submodule to your git tracking project.
  2. Open the project in Xcode, and then drag and drop the source folder named "LLDebugTool" into your project. When prompted Choose options for adding these files, be sure to check Copy items if needed.
  3. Integrate FMDB into the project. FMDB is an Objective-C wrapper open source library around SQLite.
  4. Add it to the file you need to use LLDebugTool #import "LLDebug.h", or add it directly to the pch file #import "LLDebug.h".
Swift
  1. Download the latest Objective-C code version or add the repository as a git submodule to your git tracking project.
  2. Download the latest Swift extension code version or add the repository as a git submodule to your git tracking project.
  3. Open the project in Xcode, and then drag and drop the source folders named "LLDebugTool" and "LLDebugToolSwift" to your project. When prompted Choose options for adding these files, be sure to check Copy items if needed.
  4. Integrate FMDB into the project. FMDB is an Objective-C wrapper open source library around SQLite.
  5. Add in the file you need to use LLDebugTool import LLDebugToolSwift.

how to use

start up

You need to start LLDebugTool in "application:(UIApplication * )application didFinishLaunchingWithOptions:(NSDictionary * )launchOptions", otherwise you may lose some information.

If you want to customize some parameters, you need to configure these parameters before calling "startWorking". For more detailed configuration information, please 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 {

   //####################### Color Style #######################//
   //Uncomment one of the following lines to change the color configuration.
   //[LLConfig sharedConfig].colorStyle = LLConfigColorStyleSystem;
   //[[LLConfig sharedConfig] configBackgroundColor:[UIColor orangeColor] textColor:[UIColor whiteColor] statusBarStyle:UIStatusBarStyleDefault];
    
   //####################### User Identity #######################//
   //Use this line to tag user. More config please see "LLConfig.h".
    [LLConfig sharedConfig].userIdentity = @"Miss L";
    
   //####################### Window Style #######################//
   //Uncomment one of the following lines to change the window style.
   //[LLConfig sharedConfig].windowStyle = LLConfigWindowNetBar;

   //####################### Features #######################//
   //Uncomment this line to change the available features.
   //[LLConfig sharedConfig].availables = LLConfigAvailableNoneAppInfo;
    
   //####################### Start LLDebugTool #######################//
   //Use this line to start working.
    [[LLDebugTool sharedTool] startWorking];
    
    return YES;
}
 

In Swift

import LLDebugToolSwift

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

Log

Print and save a log. For more log macro information, see LLLogHelper.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.")
    }

 
  • Save Log with event and level

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.")
    }
 

Network request

You don't need to do anything, just call "startWorking" to monitor most network requests, including using NSURLSession, NSURLConnection and AFNetworking. If you find that network requests cannot be monitored under certain circumstances, please open an issue to let me know.

collapse

You don't need to do anything, just call "startWorking" to intercept the crash, save the crash information, reason and stack information, and also save the current network request and log information at the same time.

App information

LLDebugTool will monitor the CPU, memory and FPS of the app. You can view various information of the app more conveniently.

Sandbox

LLDebugTool provides a quick way to view and manipulate sandbox files. You can delete files/folders in the sandbox more easily, or share files/folders through airdrop. As long as the file format is supported by apple, you can preview it directly through LLDebugTool.

More use

  • You can get more help by checking the Wiki .
  • You can download and run LLDebugToolDemo or LLDebugToolSwiftDemo to discover more ways to use LLDebugTool. The demo runs under XCode9.3, ios 11.3, and cocoapods 1.5.0. If there are any version compatibility issues, please let me know.

Claim

LLDebugTool supports ios8+ and needs to use ARC mode. The framework used is already included in most Xcode templates:

  • UIKit

  • Foundation

  • SystemConfiguration

  • Photos

  • malloc

  • mach-o

  • mach

  • QuickLook

  • objc

  • sys

structure

  • LLDebug.h Common header files.

  • LLConfig Configuration file.

    Used to customize colors, sizes, logos and other information. If you want to configure anything, you need to pay attention to this file.

  • LLDebugTool Tool file.

    For starting and stopping LLDebugTool, you need to look at the file "LLDebugTool.h".

  • Helper Supporting documents.

    If you are not interested in the implementation principle of the function, you can ignore this folder.

    • LLAppHelper Used to monitor various attributes of the application.
    • LLCrashHelper Used to collect crash information when the App crashes.
    • LLLogHelper Print and save logs quickly.
    • LLNetworkHelper Used to monitor network requests.
    • LLSandboxHelperSandbox Helper. Used to view and manipulate sandbox files.
    • LLStorageManagerStorage Helper. Used for data storage and reading.
  • UserInterface UI file.

    If you want to modify, view or learn about the UI, you can check this folder.

    • Base Parent file
    • Categories Class extension
    • Others Uncommon controls
    • Resources Picture resource
    • Sections View controller
    • Tool tool

contact

  • If you need help , open an issue.
  • If you want to ask a general question , open an issue.
  • If you find a bug , and can provide a reliable replication step , open a issue.
  • If you have a feature request , open an issue.
  • If you find something wrong or dislike , open an issue.
  • If you have some good ideas or some needs , please email me ( llworkinggroup@qq.com ).
  • If you want to contribute , submit a pull request.

contact

Update log

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