项目网站:https://github.com/square/PonyDebugger
作用:
debug your application's network traffic and managed object contexts.
使用前:
1.需要 Xcode's Command Line Tools
在终端 输入xcrun检查是否安装
stsdeMacBook-Pro:~ sts$ xcrun
Usage: xcrun [options] <tool name> ... arguments ...
Find and execute the named command line tool from the active developer
directory.
The active developer directory can be set using `xcode-select`, or via the
DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual
pages for more information.
Options:
-h, --help show this help message and exit
--version show the xcrun version
-v, --verbose show verbose logging output
--sdk <sdk name> find the tool for the given SDK name
--toolchain <name> find the tool for the given toolchain
-l, --log show commands to be executed (with --run)
-f, --find only find and print the tool path
-r, --run find and execute the tool (the default behavior)
-n, --no-cache do not use the lookup cache
-k, --kill-cache invalidate all existing cache entries
--show-sdk-path show selected SDK install path
--show-sdk-version show selected SDK version
--show-sdk-platform-path show selected SDK platform path
--show-sdk-platform-version show selected SDK platform version
2.安装ponyd
官方原文是:
curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py |
python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger
但是并不能用……
解决参考:http://blog.3snews.net/space.php?uid=6188&do=blog&id=69867
在终端输入1 2 3:
1 首先下载安装脚本
curl -O https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py
2 安装
python bootstrap-ponyd.py --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger
3 修复更新,依次执行下面的脚本
source ~/Library/PonyDebugger/bin/activate
pip install -U -e git+https://github.com/square/PonyDebugger.git#egg=ponydebugger --allow-external pybonjour --allow-unverified pybonjour
ponyd update-devtools
(并不会出现参考网站出现的4那个信息)
等安装结束,然后输入
ponyd serve --listen-interface=127.0.0.1
再在浏览器输入 localhost:9000 验证一下就行了。
( 安装后ponyd在 /Users/sts/Library/PonyDebugger/bin 下)。
3 使用:(留坑 2015年04月16日10:55:47)