我在做一个和拉斐尔有关的项目。事实证明,它在Android上不起作用。iPhone上是这样的。
我该怎么调试Android浏览器上的东西呢?它是WebKit,所以如果我知道版本,在完整版本的WebKit上调试它会产生相同的结果吗?
我在做一个和拉斐尔有关的项目。事实证明,它在Android上不起作用。iPhone上是这样的。
我该怎么调试Android浏览器上的东西呢?它是WebKit,所以如果我知道版本,在完整版本的WebKit上调试它会产生相同的结果吗?
当前回答
看一看jsHybugger。它将允许你远程调试你的js代码:
Android混合应用(webview, phonegap, worklight) Web页面运行在默认的android浏览器(不是Chrome,它支持ADB扩展没有这个工具)
这是如何工作的(在项目网站上有更多的细节和替代方案,这是我发现的最好的方法)。
Install the jsHybugger APK on your device Enable USB debugging on you device. Plug the Android device into your desktop computer via USB Run the app on the Android device ('jsHybugger') Enter the target URL and page in the app. Press Start Service and finally Open Browser You'll be presented with a list of installed browsers, choose one. The browser launches. Back on your desktop computer open Chrome to chrome://inspect/ An inspectors window will appear with the chrome debugging tools linked to the page on the Android device. debug away!
同样,在Android上使用Chrome使用ADB扩展而不使用jsHybugger。我想这个问题的公认答案已经描述过了。
其他回答
“Kiwi浏览器”拥有与桌面chrome浏览器相同的工具,并且可以在android上进行本地调试-不需要usb。 加载html文件,并在菜单中选择“开发人员工具”。如果需要重新启动调试,请重新加载html。
Android 5.1.1上Galaxy S6上的Android本机浏览器的全Chrome远程调试:
开启手机USB调试(设置,关于,快速点击版本号,开发人员设置,USB调试) 打开“网络” 导航到“about:debug”(你会看到一个错误) MORE菜单>设置>调试>远程调试 用USB数据线连接手机和电脑 在手机上,在Internet web浏览器中,打开要调试的站点 在电脑上打开Chrome 导航到'chrome://inspect' 单击要检查的浏览器选项卡上的“检查”
Galaxy S5设备可以在Chrome浏览器中显示,但标签页只有在重启后才能显示。重新启动并尝试连接后,移动浏览器崩溃。
看一看jsHybugger。它将允许你远程调试你的js代码:
Android混合应用(webview, phonegap, worklight) Web页面运行在默认的android浏览器(不是Chrome,它支持ADB扩展没有这个工具)
这是如何工作的(在项目网站上有更多的细节和替代方案,这是我发现的最好的方法)。
Install the jsHybugger APK on your device Enable USB debugging on you device. Plug the Android device into your desktop computer via USB Run the app on the Android device ('jsHybugger') Enter the target URL and page in the app. Press Start Service and finally Open Browser You'll be presented with a list of installed browsers, choose one. The browser launches. Back on your desktop computer open Chrome to chrome://inspect/ An inspectors window will appear with the chrome debugging tools linked to the page on the Android device. debug away!
同样,在Android上使用Chrome使用ADB扩展而不使用jsHybugger。我想这个问题的公认答案已经描述过了。
Android工作室提供所有你需要看到console.log和其他。在logcat中,只要过滤到“/Web Console”,你就会看到你的js日志…
如果你遇到任何问题,你可以添加这个插件: https://github.com/apache/cordova-plugin-console
关于:debug(或chrome:\\debug两者都表示页面无法找到,但启用设置中的debug菜单)在chrome或Opera上的Android KitKat 4.4.2在三星Tab上尝试时
如果您在设备上具有ROOT权限,则可以直接在设备上查看控制台消息。使用像CatLog这样的应用程序来查看日志输出- https://play.google.com/store/apps/details?id=com.nolanlawson.logcat&hl=en这将让你查看所有的logcat活动。
在Android KitKat/4.4.2中,浏览器控制台输出到Chromium通道。你可以通过“Chromium”来过滤所有的浏览器活动(包括浏览器的内部活动),或者简单地通过“Console”来过滤,只看到浏览器的控制台日志。
chromium [INFO:CONSOLE(3)] "The key "x-minimal-ui" is not recognized and ignored.", source http://mywebsite.com/ (3)