How to connect to iPhone's webkit debugger?

2019-04-09 04:38发布

new iOS 6 feature is, that you can debug html and javascript running on device or simulator in desktop safari. I suppose, that this feature is based on Webkit Remote Debugging Protocol.

How can I connect to webkit running on iPhone without desktop Safari?

I can do this for mobile Chrome running on Android using websockets, but how can I do that for iOS devices?

3条回答
太酷不给撩
2楼-- · 2019-04-09 04:47

You want to look at this code https://github.com/leftlogic/remote-debug/tree/master/safari - although it fails when it actually comes to RPC calls that use __rpc_forwardSocketData.

If you've got any ideas why several of us are interested!

查看更多
该账号已被封号
3楼-- · 2019-04-09 05:09

You need to open up the iPhone Simulator and browse to a website.

Then open Safari and choose "Develop" from the menubar. There is a the option called "iPhone Simulator".

If you hover over this you can see all of the open websites of the simulator.

This gives you the same inspector Safari uses. You can even see hovered elements in the iPhone Simulator.

查看更多
一纸荒年 Trace。
4楼-- · 2019-04-09 05:11

The ios-webkit-debug-proxy project (from Google!) does this.

查看更多
登录 后发表回答