LLDebugTool是一款针对开发者和测试者的调试工具,它能够帮助你在非Xcode的状况下,进行数据分析和操做。ios
为您的下一个项目选择LLDebugTool,或者迁移到您现有的项目中——您会为此感到惊喜!git
在 LLConfig
中增长了一个options LLConfigAvailableFeature
用于控制是否启用LLDebugTool
中的某个功能模块,如今你能够动态的启动/中止某个模块。更多的修改内容能够查看Version 1.1.5 Project。github
LLConfig
中增长了一个options LLConfigAvailableFeature
用于控制是否启用LLDebugTool
中的某个功能模块,如今你能够动态的启动/中止某个模块。LLConfigLogStyle
增长2个枚举值,LLConfigLogFileFuncDesc
and LLConfigLogFileDesc
。LLAppHelper
和 LLConfig
,整理代码。LLConfig
,如今你能够在运行中动态的修改 colorStyle
and windowStyle
,更多效果能够查看demo。LLSubTitleTableViewCell
解决UITextView在ios 8版本下的bug。检查网络请求或者查看某些事件的日志信息,而没必要非在XCode运行下运行。这在解决测试人员的问题上颇有用。bash
更轻松的筛选有用的信息。网络
更轻松的处理偶发的问题。app
更轻松的分析崩溃缘由。框架
更轻松的分享、预览或删除沙盒文件,这在开发阶段很是有用。工具
更轻松的观察App的CPU,内存,FPS等信息。学习
CocoaPods 是集成LLDebugTool
的首选方式。测试
pod 'LLDebugTool'
到你的Podfile里。若是只想在Debug模式下使用,则添加pod 'LLDebugTool' ,:configurations => ['Debug']
到你的Podfile里,详细的配置方式能够查看Wiki/如何仅在Debug环境中使用。pod install
来进行集成。搜索不到LLDebugTool
时,可先运行pod repo update
,再执行pod install
。#import "LLDebug.h"
,或者直接在pch文件中添加#import "LLDebug.h"
。Carthage 是一个分散的依赖管理器,它构建您的依赖并为您提供framework框架。
github "LLDebugTool"
复制代码
carthage
来构建框架,并将构建的“LLDebugTool.framework”拖到Xcode项目中。您能够直接将名为LLDebugTool文件夹的源文件添加到项目中。
#import "LLDebug.h"
,或者直接在pch文件中添加#import "LLDebug.h"
。你须要在"application:(UIApplication * )application didFinishLaunchingWithOptions:(NSDictionary * )launchOptions"中启动LLDebugTool,不然你可能会丢掉某些信息。
若是你想自定义一些参数,你须要在调用"startWorking"前配置这些参数。更详细的配置信息请看LLConfig.h。
快速启动
#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;
}
复制代码
使用自定义的配置启动
#import "AppDelegate.h"
#import "LLDebug.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// The default color configuration is LLConfigColorStyleHack.
// If you want to use other color configurations, you can use the following line.
[LLConfig sharedConfig].colorStyle = LLConfigColorStyleSimple;
// If you want to use a custom color configuration, you can use the following line.
[[LLConfig sharedConfig] configBackgroundColor:[UIColor orangeColor] textColor:[UIColor whiteColor] statusBarStyle:UIStatusBarStyleDefault];
// If you don't want to use color configuration, you can use the following line. [LLConfig sharedConfig].useSystemColor = YES; // Start working. [[LLDebugTool sharedTool] startWorking]; // Write your project code here. return YES; } 复制代码
打印和保存一个日志。 更多的log宏信息查看LLLogHelper.h。
保存日志
#import "LLDebug.h"
- (void)testNormalLog {
// Insert an LLog where you want to print.
LLog(@"Message you want to save or print.");
}
复制代码
Save Log with event and level
#import "LLDebug.h"
- (void)test
- (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.");
}
复制代码
你不须要作任何操做,只须要调用了"startWorking"就能够监控大部分的网络请求,包括使用NSURLSession,NSURLConnection和AFNetworking。若是你发现某些状况下没法监控网络请求,请打开一个issue来告诉我。
你不须要作任何操做,只须要调用"startWorking"就能够截获崩溃,保存崩溃信息、缘由和堆栈信息,而且也会同时保存当次网络请求和日志信息。
LLDebugTool会监控app的CPU,内存和FPS。你能够更便捷的查看app的各类信息。
LLDebugTool提供了一个快捷的方式来查看和操做沙盒文件,你能够更轻松的删除沙盒中的文件/文件夹,或者经过airdrop来分享文件/文件夹。只要是apple支持的文件格式,你能够直接经过LLDebugTool来预览。
LLDebugTool在支持ios8+,而且须要使用ARC模式。使用到的框架已经包含在大多数Xcode模板中:
UIKit
Foundation
SystemConfiguration
Photos
malloc
mach-o
mach
QuickLook
objc
sys
LLDebug.h
公用头文件.
LLConfig
配置文件。
用于自定义颜色、大小、标识和其余信息。若是您想要配置任何东西,您须要关注这个文件。
LLDebugTool
工具文件。
用于启动和中止LLDebugTool,你须要看一下"LLDebugTool.h"这个文件。
Helper
辅助文件。
若是你对功能的实现原理不感兴趣,那么能够忽略这个文件夹。
LLAppHelper
用于监视应用程序的各类属性。LLCrashHelper
用于当App发生崩溃时,收集崩溃信息。LLLogHelper
快速打印和保存日志。LLNetworkHelper
用于监视网络请求。LLSandboxHelper
Sandbox Helper。用于查看和操做沙盒文件。LLStorageManager
Storage Helper。用于数据存储和读取。UserInterface
UI文件。
若是你想要修改、查看或者学习UI方面的东西,你能够查看一下这个文件夹。
Base
父类文件Categories
类扩展Others
不通用的控件Resources
图片资源Sections
视图控制器Tool
工具能够在 CHANGELOG 中找到每一个LLDebugTool版本的简要总结。