【问题标题】:How to debug Android's built-in browser for my website?如何为我的网站调试 Android 的内置浏览器?
【发布时间】:2016-07-02 10:37:44
【问题描述】:

我的网站在 Android 上的 Google Chrome 42 和 Mozilla Firefox 47 上运行良好,但不适用于 Android 的内置浏览器(也适用于 Opera Mini 17),我怎么知道javascript 的哪一部分使我的网站运行不正常?

注意:我没有要求在 Google Chrome 或 Mozilla Firefox 移动设备上进行调试,而是在 Android 的内置浏览器或 Opera Mini 上进行调试

【问题讨论】:

    标签: android debugging browser cross-browser


    【解决方案1】:

    为此,您可以使用名为 Weinre 的出色工具 :)

    它有什么作用?

    它允许您从桌面调试手机上运行的网站,将其视为移动网络浏览器的开发工具。

    如何设置?

    首先安装 npm,如果你在 Windows 上,请在 Windows 上按照link npm 以管理员身份运行 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运行得很好,很新鲜。

    【讨论】:

      猜你喜欢
      • 2015-02-03
      • 2016-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-30
      • 1970-01-01
      • 2012-02-10
      • 2018-06-08
      相关资源
      最近更新 更多