LLDebugTool is a debugging tool for developers and testers. It can help you analyze and manipulate data without Xcode.

LLDebugToolSwift is a Swift extension for LLDebugTool. It provides the Swift interface for LLDebugTool. LLDebugToolSwift and LLDebugTool update synchronously.

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

Select LLDebugTool for your next project, or migrate to your existing project – you’ll be pleasantly surprised!

Gif


ScreenShots





Last updated (1.2.0)

Componentization is supported.

LLDebugTool now supports componentization. Now you can integrate one or more modules into your own Debug tools. You can either use the view controllers contained in each module directly, or just call the functions in the Function folder and build your OWN UI.

For details on how to use componentization, see Wiki to use componentization or add LLDebugTool to your project.

More changes can be found in Version 1.2.0 Project.

new

  • increaseLLRouteTo resolve cross-references between components. When related components exist,LLRouteThe relevant methods will be called, otherwise nothing will be done.

update

  • Update the folder directory. Now the whole project is sorted by component, under each component folder, divided into Function and UserInterface.

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

  • The updated NSURLSessionConfiguration. J m, hook protocolClasses this method.

What can I do with LLDebugTool?

  • Check network requests or view logs for certain events without having to run under XCode. This is useful in solving testers’ problems.

  • Filter useful information more easily.

  • Deal with contingencies more easily.

  • Easier analysis of crash causes.

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

  • Easier to see App CPU, memory, FPS, etc.

Add LLDebugTool to your project

CocoaPods

CocoaPods is the preferred way to integrate LLDebugTool.

Objective – C
  1. addPod 'LLDebugTool', '~> 1.0.0'Put it in your Podfile. Add if you only want to use it in Debug modePod 'LLDebugTool', '~> 1.0.0',: Configurations => ['Debug']Go to your Podfile for details on how to configure itHow to use Wiki/ only in Debug environment. If you want to specify a version, you can use it like thisPod 'LLDebugTool', '1.1.7',: Configurations => ['Debug'].
  2. The input terminalpod installTo integrate. Search is less thanLLDebugToolIf the latest version cannot be found, run the command firstpod repo updateAnd then to performpod install.
  3. Add LLDebugTool to the file you need to use#import "LLDebug.h"Or add it directly to the PCH file#import "LLDebug.h".
Swift
  1. addPod 'LLDebugToolSwift', '~> 1.0.0'Put it in your Podfile. Add if you only want to use it in Debug modePod 'LLDebugToolSwift', '~> 1.0.0',: Configurations => ['Debug']Go to your Podfile for details on how to configure itHow to use Wiki/ only in Debug environment. If you want to specify a version, you can use it like thisPod 'LLDebugToolSwift', '1.1.7',: Configurations => ['Debug'].
  2. You must add use_frameworks to your Podfile! .
  3. The input terminalpod installTo integrate. Search is less thanLLDebugToolSwiftIf the latest version cannot be found, run the command firstpod repo updateAnd then to performpod install.
  4. Add LLDebugTool to the file you need to useimport LLDebugToolSwift.

Carthage

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

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

    github "LLDebugTool"

  2. Run Carthage to build the framework and drag the llDebugTool. framework built into the Xcode project.

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

    github "LLDebugToolSwift"

  2. Run Carthage to build the framework, and will build LLDebugToolSwift. The framework to the Xcode project.

The source file

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

Objective – C
  1. Download the latest version of the code or add the repository as a Git submodule to your Git trace project.
  2. Open the project in Xcode and drag the source folder named “LLDebugTool” into your project. When prompted to Choose Options for adding these files, be sure to check Copy Items if needed.
  3. Integrate FMDB, an open source library of Objective-C wrappers around SQLite, into your project.
  4. Add LLDebugTool to the file you need to use#import "LLDebug.h"Or add it directly to the PCH file#import "LLDebug.h".
Swift
  1. Download the latest version of objective-C code or add the repository as a Git submodule to your Git trace project.
  2. Download the latest version of the Swift extension code or add the repository as a Git submodule to your Git trace project.
  3. Open the project in Xcode, then drag and drop the source folders named “LLDebugTool” and “LLDebugToolSwift” into your project. When prompted to Choose Options for adding these files, be sure to check Copy Items if needed.
  4. Integrate FMDB, an open source library of Objective-C wrappers around SQLite, into your project.
  5. Add LLDebugTool to the file you need to useimport LLDebugToolSwift.

How to use

Start the

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

If you want to customize some parameters, you need to configure them before calling “startWorking”. For more detailed configuration information, see llconfig.h.

  • Quick start

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; }Copy the code

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
    }
Copy the code
  • Start with a custom configuration

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; }Copy the code

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
    }
Copy the code

The log

Print and save a log. See llLogHelper.h for more log macro information.

  • Save the log

In Objective-C

#import "LLDebug.h"

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

In Swift

import LLDebugToolSwift

    func testNormalLog(a) {
        // Insert an LLog where you want to print.
        LLog.log(message: "Message you want to save or print.")}Copy the code
  • 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."); }Copy the code

In Swift

import LLDebugToolSwift

    func testEventErrorLog(a) {
        // 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.")}Copy the code

Network request

You don’t need to do anything, just call “startWorking” to monitor most network requests, including NSURLSession, NSURLConnection, and AFNetworking. Please open an issue to let me know if you find some situations where you cannot monitor network requests.

collapse

You don’t need to do anything, just call “startWorking” to intercept the crash, save crash information, cause and stack information, and also save current network requests and log information.

The App information

LLDebugTool monitors the CPU, memory, and FPS of the app. You can view all kinds of information in the app more easily.

sandbox

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

Use more

  • You can check out the Wiki for more help.
  • You can download and run LLDebugToolDemo or LLDebugToolSwiftDemo to find out more about LLDebugTool. Demo runs on XCode9.3, ios 11.3, cocoapods 1.5.0, please let me know if there are any version compatibility issues.

requirements

LLDebugTool supports ios8+ and requires 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 Public header file.

  • LLConfig Configuration file.

    Use 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.

    To start and stop LLDebugTool, you need to look at the file “llDebugTool.h”.

  • Helper Helper files.

    If you are not interested in how the functionality works, you can ignore this folder.

    • LLAppHelperUsed to monitor various properties of the application.
    • LLCrashHelperUsed to collect crash information when the App crashes.
    • LLLogHelperPrint and save logs quickly.
    • LLNetworkHelperUsed to monitor network requests.
    • LLSandboxHelperThe Sandbox Helper. Use 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 something about the UI, you can check out this folder.

    • BaseThe parent class file
    • CategoriesClass extensions
    • OthersNon-generic control
    • ResourcesImage resources
    • SectionsView controller
    • Tooltool

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 reliable replication steps, open an issue.
  • If you have a feature request, open an issue.
  • If you find something wrong or you don’t like, open an issue.
  • If you have some good ideas or requirements, please email me ([email protected]).
  • If you want to contribute, submit a pull Request.

contact

  • You can send me a private message in Jane’s book.
  • You can send them to [email protected]

Update log

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