ponyDebugger安装失败处理和使用感悟
2014-04-23 10:45
309 查看
ponyDebugger是一个远程调试工具包,通过使用 Chrome 开发者工具来调试 iOS 应用的网络流量和数据存储。https://github.com/square/PonyDebugger这有它的源码和使用方法。
下面我简单说明一下分别在模拟器和真机下配置使用ponyDebugger
一.在模拟器下使用ponyDebugger
1.配置服务器端
1). 安装 Xcode's Command Line Tools
2). 在shell里面执行下面命令
如果安装过程中处理如下问题:
解决办法:
3). 安装成功以后,在shell里面执行
4). 打开你的浏览器 输入地址
http://localhost:9000
如果看见的是这样
![](http://ww4.sinaimg.cn/large/a74ecc4cjw1e0sfa4zcdkj.jpg)
test1说明服务器端已经安装好了。
2.IOS 端
(1)安装cocoapoads
(3)点击i进行编辑,退出编辑(点击esc键,插入:wq)
(4)安装
3.使用
在你的工程中,输入下面的代码:
PDDebugger *debugger = [PDDebugger defaultInstance];
[debugger enableNetworkTrafficDebugging];
[debugger forwardAllNetworkTraffic];
[debugger enableCoreDataDebugging];
[debugger connectToURL:[NSURL URLWithString:@"ws://127.0.0.1/device"]];
4.然后编译工程,运行,在浏览器中就可以浏览到信息了。
二:在真机下使用ponyDebugger工具
在真机下运行ponyDebugger这个工具,其它的地方都相似,唯一不同的地方有3:
(1)要确保手机和pc在统一网络下(手机和pc要连接到统一无线网络中)
(2)确认你的ip地址
直接在concle模式下,输入 ifconfig,查找出你的ip地址(我的是en1下inet ,为什么我也不懂,我是试出来的结果,那位高人知道给我解释下行吗?)
(3).将所有地址修改为2中的ip地址,主要设计到3个地方,
一是~/Library/PonyDebugger/bin/ponyd serve --listen-interface=你的ip
二是浏览器地址栏中:://你的ip:9000
三是代码中:[debugger connectToURL:[NSURL URLWithString:@"ws://你的ip/device"]];
这样ponyDebugger在真机或是模拟器中都搭建起来了,要想多了解,多看看源码。。。
下面我简单说明一下分别在模拟器和真机下配置使用ponyDebugger
一.在模拟器下使用ponyDebugger
1.配置服务器端
1). 安装 Xcode's Command Line Tools
2). 在shell里面执行下面命令
12[/code] | curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | \ python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger[/code] |
12[/code] | curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | \ python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebuggerNew python executable in /Users/wenchuang/Library/PonyDebugger/bin/python Installing setuptools................done. Installing pip..............done. Obtaining ponydebugger from git+https://github.com/square/PonyDebugger.git#egg=ponydebugger Updating ./Library/PonyDebugger/src/ponydebugger clone Running setup.py (path:/Users/wenchuang/Library/PonyDebugger/src/ponydebugger/setup.py) egg_info for package ponydebugger Installing extra requirements: 'egg' Downloading/unpacking tornado (from ponydebugger) Downloading tornado-3.2.tar.gz (400kB): 400kB downloaded Running setup.py (path:/Users/wenchuang/Library/PonyDebugger/build/tornado/setup.py) egg_info for package tornado Downloading/unpacking pybonjour (from ponydebugger) Could not find any downloads that satisfy the requirement pybonjour (from ponydebugger) Some externally hosted files were ignored (use --allow-external pybonjour to allow). Cleaning up... No distributions at all found for pybonjour (from ponydebugger) Storing debug log for failure in /Users/wenchuang/.pip/pip.log Traceback (most recent call last): File "<stdin>", line 2462, in <module> File "<stdin>", line 946, in main File "<stdin>", line 1794, in after_install File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 511, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/wenchuang/Library/PonyDebugger/bin/pip', 'install', '-U', '-e', 'git+https://github.com/square/PonyDebugger.git#egg=ponydebugger']' returned non-zero exit status 1 [/code] |
[/code] | 在shell里面执行下面命令# activate your virtualenv source ~/Library/PonyDebugger/bin/activate # update the ponyd source pip install -U -e git+https://github.com/square/PonyDebugger.git#egg=ponydebugger --allow-external pybonjour --allow-unverified pybonjour # updates chrome dev tools source ponyd update-devtools |
1[/code] | ponyd serve --listen-interface=127.0.0.1 注意:这时候如果弹出-bash: ponyd: command not found,修改成:~/Library/PonyDebugger/bin/ponyd serve --listen-interface=127.0.0.1 就ok了 [/code] |
http://localhost:9000
如果看见的是这样
![](http://ww4.sinaimg.cn/large/a74ecc4cjw1e0sfa4zcdkj.jpg)
test1说明服务器端已经安装好了。
2.IOS 端
(1)安装cocoapoads
$ sudo gem install cocoapods $ pod setup
(2)cd到文件目录,编辑Profile文件
$ cd 文件目录 $ vim Profile
(3)点击i进行编辑,退出编辑(点击esc键,插入:wq)
platform :ios, '5.0' pod 'PonyDebugger', '~> 0.3.1'
(4)安装
$ pod install
3.使用
在你的工程中,输入下面的代码:
PDDebugger *debugger = [PDDebugger defaultInstance];
[debugger enableNetworkTrafficDebugging];
[debugger forwardAllNetworkTraffic];
[debugger enableCoreDataDebugging];
[debugger connectToURL:[NSURL URLWithString:@"ws://127.0.0.1/device"]];
4.然后编译工程,运行,在浏览器中就可以浏览到信息了。
二:在真机下使用ponyDebugger工具
在真机下运行ponyDebugger这个工具,其它的地方都相似,唯一不同的地方有3:
(1)要确保手机和pc在统一网络下(手机和pc要连接到统一无线网络中)
(2)确认你的ip地址
直接在concle模式下,输入 ifconfig,查找出你的ip地址(我的是en1下inet ,为什么我也不懂,我是试出来的结果,那位高人知道给我解释下行吗?)
(3).将所有地址修改为2中的ip地址,主要设计到3个地方,
一是~/Library/PonyDebugger/bin/ponyd serve --listen-interface=你的ip
二是浏览器地址栏中:://你的ip:9000
三是代码中:[debugger connectToURL:[NSURL URLWithString:@"ws://你的ip/device"]];
这样ponyDebugger在真机或是模拟器中都搭建起来了,要想多了解,多看看源码。。。
相关文章推荐
- centos下使用yum 安装pip失败处理
- 【工具使用】Linux日常使用之软件安装失败的处理方式
- PonyDebugger的安装使用
- 官方文档才是王道:PonyDebugger安装坑的感悟;
- ponyDebugger 使用感悟
- ponyDebugger 使用感悟
- API网关Ocelot 使用Polly 处理部分失败问题
- Microsoft SQL Server 2005 安装失败处理
- 主线程不允许联网处理,使用handle失败,API23,AS2.1
- Perl(CGI)默认的MSI安装包安装失败的处理方式
- 使用conda安装jieba等第三方包失败
- Sql 还原失败 之 “因为数据库正在使用,所以未能获得对数据库的排它访问权”的处理
- windows下Python2与Python3共存的使用方法以及pip的使用方法以及pip安装报错:is not a supported wheel on this platform的处理方法
- IIS7报错:如果要使用托管的处理程序,请安装 ASP.NET
- NET Framework 4.0的安装失败处理
- sql 2008 安装失败 mof语法错误 处理
- 安装Oracle11gR2先决条件检查失败的详细解决处理过程
- 解决Ubuntu 下Sublime Text使用Package Control安装插件失败
- 中文分词语言处理HanPL配置,以及在eclipse中安装使用方式
- [eclipse使用]采用直接copy plugins和features文件夹到eclipse目录方式安装pdt文件失败的问题