在Android模拟器的console.log浏览器 [英] console.log browser in android emulator

查看:287
本文介绍了在Android模拟器的console.log浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用的Andr​​oid模拟器看到一个网站的console.log消息?

How to see console.log messages of a website using android simulator?

推荐答案

从丰富的切特温德的简短文章JavaScript调试的Andr​​oid浏览器。

From Rich Chetwynd's short article "Javascript debugging on Android browser".

您可以从Android设备或模拟器记录的JavaScript错误和控制台消息。要做到这一点,你首先需要安装Android SDK和USB驱动程序和实际设备上启用USB调试。

You can log javascript errors and console messages from your Android device or emulator. To do this you first need to install the Android SDK and USB drivers and enable USB debugging on the actual device.

要检查设备连接正确,您可以从您的Andr​​oid SDK工具目录运行以下cmd,然后你应该看到的设备列表中的

To check if the device is connected correctly you can run the following cmd from your Android SDK tools directory and you should see a device in the list

C:\\ Android SDK中.. \\平台工具\\ ADB设备

您就可以使用Android调试桥过滤调试信息,这样你只能通过运行看浏览器相关的消息如下CMD。

You can then use the Android Debug Bridge to filter debug messages so that you only see browser related messages by running the following cmd.

C:\\ Android SDK中.. \\平台工具\\亚行logcat的浏览器:V *:•

默认情况下,日志写入stdout所以你会看到任何JavaScript错误或写入到cmd窗口的console.log消息等。

By default the log is written to stdout so you will see any Javascript errors or console.log messages etc written to the cmd window.

这篇关于在Android模拟器的console.log浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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