如何为我的网站调试 Android 的内置浏览器?
How to debug Android's built-in browser for my website?
我的网站在 Google Chrome 42 和 Android 上的 Mozilla Firefox 47 上运行良好,但不适用于 Android 的内置浏览器 (还有 Opera Mini 17),我怎么知道 javascript
的哪一部分使我的网站不正确 运行?
注意:我没有要求在 Google Chrome 或 Mozilla Firefox mobile 上进行调试,但对于 Android 的内置-在浏览器或 Opera Mini
为此,您可以使用一个名为 Weinre 的好工具 :)
它有什么作用?
它允许您从桌面调试 phone 上的网站 运行,将其视为移动网络浏览器的开发人员工具。
如何设置?
首先安装 npm,如果你在 Windows,请按照 link npm on Windows 安装
运行 以管理员身份cmd,然后使用以下命令安装weinre:
npm -g install weinre
现在启动weinre服务器:
weinre --httpPort 8081 --boundHost -all-
--httpPort specifies the port to run the HTTP server on, default is 8080.
--boundHost specifies the ip address to bind the server to. Default is localhost, but for convenience make it bind to all ip addresses.
现在去http://localhost:8081/,你会看到你的Weinre运行又好又新鲜。
我的网站在 Google Chrome 42 和 Android 上的 Mozilla Firefox 47 上运行良好,但不适用于 Android 的内置浏览器 (还有 Opera Mini 17),我怎么知道 javascript
的哪一部分使我的网站不正确 运行?
注意:我没有要求在 Google Chrome 或 Mozilla Firefox mobile 上进行调试,但对于 Android 的内置-在浏览器或 Opera Mini
为此,您可以使用一个名为 Weinre 的好工具 :)
它有什么作用?
它允许您从桌面调试 phone 上的网站 运行,将其视为移动网络浏览器的开发人员工具。
如何设置?
首先安装 npm,如果你在 Windows,请按照 link npm on Windows 安装 运行 以管理员身份cmd,然后使用以下命令安装weinre:
npm -g install weinre
现在启动weinre服务器:
weinre --httpPort 8081 --boundHost -all-
--httpPort specifies the port to run the HTTP server on, default is 8080.
--boundHost specifies the ip address to bind the server to. Default is localhost, but for convenience make it bind to all ip addresses.
现在去http://localhost:8081/,你会看到你的Weinre运行又好又新鲜。