__pip_description__
Project description
使用指引
安装lldblogger
pip install lldblogger
指定要测试的app目录地址和断点日志配置文件
from lldblogger.runner import Runner
runner = Runner(log_output_path='log file path')
runner.run("path to app", "path to config json")
...
runner.terminate() # 停止调试
app文件可以从debug配置的ipa包中解压出来,同时需要将配套的dSYM文件置于同一个目录,可以通过Runner的构造函数指定断点日志输出到哪个文件。
断点日志配置文件格式如下:
[
{
"file": "文件名",
"line": 48,
"log": "[测试串行队列] counter: @counter@"
},
{
"symbol": "-[ViewController viewDidLoad]",
"log": "<From LLDB> [LLDBTest] 使用符号断点 ViewController viewDidLoad"
}
]
目前支持两种形式的断点日志
- 指定文件名和代码行数,
file
表示文件名,比如AppDelegate.m
,line
表示代码行数,log
表示要打印的日志 - 指定方法的符号名称
symbol
,同样log
表示要打印的日志
日志log
可以包含动态参数,使用@@
包裹动态参数,比如要打印局部变量localVar
,可以这么写
"log": "局部变量:@localVar@"
目前已测试的动态参数支持情况:
- 方法的参数
- 局部变量
- 静态变量
- 类的实例变量
- 简单的表达式
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file lldblogger_cli-1.0-py3-none-any.whl
.
File metadata
- Download URL: lldblogger_cli-1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9b6f888cd77ec4ddb20bb7c12598feed6c9b76370f6161226f70c22192500bc |
|
MD5 | ee3ad60ecbc92f3dc2a16e14df4abcf1 |
|
BLAKE2b-256 | 22dacbba0ccd8e5a034575cb6b59d19074edde07a34394f34be9d29096b73029 |