在linux上使用ios_webkit_debug_proxy

MTi*_*ted 11 javascript linux iphone google-chrome remote-debugging

我正在尝试使用https://github.com/google/ios-webkit-debug-proxy中的说明在iPhone上调试我的网站(运行iOS 7.1.2).

我编译了ios_webkit_debug_proxy,并使用ios_webkit_debug_proxy -d运行它

然后我开始google-chrome并将其指向localhost:9222/显示我的iPhone及其当前访问的网站.然后我将链接地址复制/粘贴(chrome-devtools://devtools/bundled/devtools.html?host=localhost:9222&page=1)到新的chrome选项卡中,然后我得到一个显示的调试窗口

Elements,Network,Sources,Timeline,Profiles,Resources,Audits,Console.
Run Code Online (Sandbox Code Playgroud)

但是没有一个theese按钮显示任何真实的内容.没有dom.没有javascript.控制台视图中没有输出.网络中没有活动.它就像调试一个空视图.

每次我的iPhone访问新网站时,我的ios_webkit_debug_proxy -d控制台都会显示一条新消息.但它没有显示其他活动.消息以类似的东西开头

ss.remove_fd(7)
ss.recv fd=13 len=0
ss.remove_fd(13)
ss.recv fd=12 len=221
wi.recv[221]:
Run Code Online (Sandbox Code Playgroud)

他们尽我所能,包含网站网址,但不包含网站上的任何真实内容.

我启动chrome的控制台,显示消息:

"Uncaught TypeError: Cannot read property 'frame' of undefined", source: chrome-devtools:/
Run Code Online (Sandbox Code Playgroud)

我正在使用Fedora 20.

有没有人知道为什么这不起作用?谢谢

小智 1

我不清楚您是否在收到如下两行localhost:9222/ 后切换浏览器:

Listing devices on :9221
Connected :9222 to Will's iPhone (8a48ac86edd4f299xxxxxxxxxxxxxxx)
Run Code Online (Sandbox Code Playgroud)

如果您没有看到第二行,则意味着您可能遇到usbmuxdor问题libimobiledevice

我自己在代理方面遇到了一些问题,但后来我能够满意地使用它。根据我的经验,有几件事可以让生活变得更轻松:

1) 以 root 身份运行 usbmuxd,并可能使用选项 -fv,这样它就不会与 tty 分离,您会看到会发生什么。在我的 Debian 安装中,它是由系统用户在后台运行的;

2)为了避免发生未处理的异常时代理崩溃,不要使用 chrome/chromium 的调试器版本,而是使用相当旧的版本https://chrome-devtools-frontend.appspot.com/static /18.0.1025.99/devtools.html(参见https://github.com/google/ios-webkit-debug-proxy/issues/63