❎怎样调试ios移动端(二):如何使用chrome来调试ios呢

2019-11-13  本文已影响0人  收纳哥斯拉

前言:这是让iphone上的safari适配mac上的chrome情况。这个方法有些问题,最后会得到空白页面,还需要再研究,先搁置。

1、先把iphone上的开发者选项打来

settings --> safari --> adavanced --> web inspector

2、安装ios_webkit_debug_proxy

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ios-webkit-debug-proxy

3、连接测试

确认电脑安装了itunes,确认手机已连接pc,输入

ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html!

image

在localhost:9221中查看设备连接情况,此时可看到连接设备的地址。

image

chrome://inspect/#devices添加设备端口,在红圈处进行添加

image image

此时手机通过safari访问网页,刷新chrome://inspect/#devices,多试几次,将在target可以看到如下:

image

点击inspect,就可看到调试界面了。(你在手机上的操作在调试界面都可以看到)

参考作者:Ching_Lee
链接:https://www.jianshu.com/p/e256932453dd

上一篇 下一篇

猜你喜欢

热点阅读