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!
LLDebugTool
supports component-based now. Now you can integrate only one or more modules into your own Debug debugger. You can directly use the view controller contained in each module, or just call the functions in Function
folder and build UI yourself.
How to use components, see WikiUse Components or Adding LLDebugTool to your project.
More changes can be viewed in Version 1.2.2 Project.
- Update
LLWindow.m
and make[UIApplication sharedApplication].delegate.window
become key window whenLLWindow
become key window.
-
Always check the network request or view log information for certain events without having to run under XCode. This is useful in solving the testers' problems..
-
Easier filtering and filtering of useful information.
-
Easier analysis of occasional problems.
-
Easier analysis of the cause of the crash.
-
Easier sharing, previewing, or removing sandbox files, which can be very useful in the development stage.
-
Easier observe app's memory, CPU, FPS and other information.
CocoaPods is the recommended way to add LLDebugTool
to your project.
- Add a pod entry for LLDebugTool to your Podfile
pod 'LLDebugTool' , '~> 1.0.0'
, If only you want to use it only in Debug mode, Add a pod entry for LLDebugTool to your Podfilepod 'LLDebugTool' , '~> 1.0.0' ,:configurations => ['Debug']
, Details also see Wiki/Use in Debug environment. If you want to specify the version, use aspod 'LLDebugTool' , '1.2.2' ,:configurations => ['Debug']
.- If you want to use a module, add a pod entry for LLDebugTool to your Podfile
pod 'LLDebugTool/{Component Name}'
, Currently supported components arepod 'LLDebugTool/AppInfo' pod 'LLDebugTool/Crash' pod 'LLDebugTool/Log' pod 'LLDebugTool/Network' pod 'LLDebugTool/Sandbox' pod 'LLDebugTool/Screenshot'
- Install the pod(s) by running
pod install
. If you can't searchLLDebugTool
or you can't find the newest release version, runningpod repo update
beforepod install
.- Include LLDebugTool wherever you need it with
#import "LLDebug.h"
or you can write#import "LLDebug.h"
in your .pch in your .pch file.
- Add a pod entry for LLDebugToolSwift to your Podfile
pod 'LLDebugToolSwift' , '~> 1.0.0'
, If only you want to use it only in Debug mode, Add a pod entry for LLDebugToolSwift to your Podfilepod 'LLDebugToolSwift' , '~> 1.0.0' ,:configurations => ['Debug']
, Details also see Wiki/Use in Debug environment. If you want to specify the version, use aspod 'LLDebugToolSwift' , '1.2.2' ,:configurations => ['Debug']
.- If you want to use a module, add a pod entry for LLDebugTool to your Podfile
pod 'LLDebugToolSwift/{Component Name}'
, Currently supported components arepod 'LLDebugToolSwift/AppInfo' pod 'LLDebugToolSwift/Crash' pod 'LLDebugToolSwift/Log' pod 'LLDebugToolSwift/Network' pod 'LLDebugToolSwift/Sandbox' pod 'LLDebugToolSwift/Screenshot'
- Must be added in the Podfile
use_frameworks!
.- Install the pod(s) by running
pod install
. If you can't searchLLDebugToolSwift
or you can't find the newest release version, runningpod repo update
beforepod install
.- Include LLDebugTool wherever you need it with
import "LLDebugToolSwift
.
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
To integrate LLDebugTool into your Xcode project using Carthage, specify it in your
Cartfile
:
github "LLDebugTool"
Run
carthage
to build the framework and drag the builtLLDebugTool.framework
into your Xcode project.
To integrate LLDebugToolSwift into your Xcode project using Carthage, specify it in your
Cartfile
:
github "LLDebugToolSwift"
Run
carthage
to build the framework and drag the builtLLDebugToolSwift.framework
into your Xcode project.
Alternatively you can directly add the source folder named LLDebugTool. to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- 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". If you want to use only one module ,see WikiUse Components.- Integrated FMDB to your project,FMDB is an Objective-C wrapper around SQLite.
- Include LLDebugTool wherever you need it with
#import "LLDebug.h"
or you can write#import "LLDebug.h"
in your .pch in your .pch file.
- Download the LLDebugTool latest code version or add the repository as a git submodule to your git-tracked project.
- Download the LLDebugToolSwift latest code version or add the repository as a git submodule to your git-tracked project.
- Open your project in Xcode, then drag and drop the source folder named
LLDebugTool
andLLDebugToolSwift
. When you are prompted to "Choose options for adding these files", be sure to check the "Copy items if needed". If you want to use only one module ,see WikiUse Components.- Integrated FMDB to your project,FMDB is an Objective-C wrapper around SQLite.
- Include LLDebugTool wherever you need it with
import LLDebugToolSwift"
.
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.
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;
}
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
}
Start With Custom Config
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
}
Print and save a log. More log macros details see LLLogHelper.h.
Save 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.");
}
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.")
}
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.
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.
LLDebugTool monitors the app's CPU, memory, and FPS. At the same time, you can also quickly check the various information of the app.
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.
- You can get more help by looking at the Wiki.
- You can download and run the LLDebugToolDemo or LLDebugToolSwiftDemo to find more use with LLDebugTool. The demo is build under XCode9.3, ios 11.3 and cocoapods 1.5.0. If there is any version compatibility problem, please let me know.
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:
-
UIKit
-
Foundation
-
SystemConfiguration
-
Photos
-
QuickLook
-
LLDebug.h
Public header file.You can refer it to the pch file.
-
DebugTool
Tool files.To start and stop LLDebugTool, you need to look at the "LLDebugTool.h".
-
Config
Configuration file.For the custom color , size , identification and other information. If you want to configure anything, you need to focus on this file.
-
Components
Components files.If you're not interested in how the functionality works, you can ignore this folder. Each component folder is divided into
Function
andUserInterface
,Function
is the specific function implementation,UserInterface
is the specific UI build.AppInfo
Use to monitoring app's properties, depend onGeneral
.Crash
Used to collect crash information when an App crashes, depend onLLStorageManager
.Log
Used to quick print and save log, depend onLLStorageManager
.Network
Use to monitoring network request, depend onLLStorageManager
.Sandbox
Used to view and operate sandbox files, depend onGeneral
.Screenshot
Used to process and display screenshots, depend onGeneral
.LLStorageManager
Used to data storage and reading, depend onGeneral
.General
The basic component of other components, depend onConfig
.
- If you need help, open an issue.
- If you'd like to ask a general question, open an issue.
- If you found a bug, and can provide steps to reliably reproduce it, open an issue.
- If you have a feature request, open an issue.
- If you find anything wrong or anything dislike, open an issue.
- If you have some good ideas or some requests, send mail([email protected]) to me.
- If you want to contribute, submit a pull request.
- Send email to [email protected]
- Send message in twitter @HdbLi
- Send message in JianShu
A brief summary of each LLDebugTool release can be found in the CHANGELOG.
This code is distributed under the terms and conditions of the MIT license.