是否可以在Windows 10上调试iOS Chrome? [英] Is it possible debug iOS Chrome on Windows 10?

查看:118
本文介绍了是否可以在Windows 10上调试iOS Chrome?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,我需要在Windows 10的iOS设备(iPod,iPad等)上调试通过移动Chrome打开的网站。我已经通过Chrome DevTools在Windows 10上成功设置了iOS Safari调试( GitHub存储库有用的评论)。除了Chrome或Firefox,而不是Safari,我也想做同样的事情。

As the title says, I need to debug a website opened with mobile Chrome on an iOS device (iPod, iPad etc.) on Windows 10. I have successfully set up iOS Safari debugging on Windows 10 via Chrome DevTools (GitHub repo , helpful comment). I would love to do the same thing except with Chrome or Firefox and not Safari. Is it even possible?

推荐答案

是的。


  1. 安装weinre <$ c $,您首先需要节点,然后(在iOS> Settings> Safari上启用了Web检查器)。 c> sudo npm -gi weinre (或) npm i -g weinre

  2. 运行weinre weinre --boundHost YOUR_IP:PORT

  3. 运行时,将以下脚本粘贴到您的代码中

  1. Install weinre sudo npm -g i weinre (or) npm i -g weinre
  2. Run weinre weinre --boundHost YOUR_IP:PORT
  3. When it runs copy paste the following script to your code

< script src = http:// YOUR_IP_ADDRESS:PORT / target / target-script-min.js>< / script>


  1. 通过USB连接iOS设备

  1. Connect your iOS device via USB

从要调试的浏览器(您的PC)转到 http:// YOUR_IP_ADDRESS:PORT / client / 会看到您的设备。

Go to http://YOUR_IP_ADDRESS:PORT/client/ from your browser (your pc) where you want to debug and you'll see your device.

步骤2中的错误

如果在步骤2中看到任何错误,请首先通过 ipconfig 检查IP,然后将相似的IP与未使用的空闲端口绑定。例如,我的本地ip是192.168.1.5,因此我使用了一个免费端口- 192.168.1.5:4576

If you see any error in step 2, first check your IP via ipconfig and then bound a similar IP with a free port that is not being used. For example my local ip is 192.168.1.5 so I used the same with a free port - 192.168.1.5:4576

步骤5中的错误

如果看不到设备,请尝试添加名称 myDevice 步骤3 中的脚本,如下所示

If you can't see your device try adding a name myDevice to the script in Step 3 as follows

< script src = http:// YOUR_IP_ADDRESS:PORT / target / target-script-min.js#myDevice>< / script>

然后在第5步中,到达设备时,将设备名称添加到URL中,作为
http:// YOUR_IP_ADDRESS:PORT / client /#myDevice

Then in Step 5, when reaching your device add the device name to the URL as http://YOUR_IP_ADDRESS:PORT/client/#myDevice

成功

如果一切正常,您将可以检查代码,读取indexedDB,session和localStorage并查看Console中的输出以及其他开发工具。

If everything runs fine, you'll be able to inspect your code, read indexedDB, session and localStorage and see outputs in Console among other dev tools.

这篇关于是否可以在Windows 10上调试iOS Chrome?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆