Skip to main content
 首页 » 编程设计

android-emulator之android模拟器中的console.log浏览器

2024年11月01日14小虾米

怎么看 console.log使用android模拟器的网站消息?

请您参考如下方法:

来自 Rich Chetwynd 的短文“Android 浏览器上的 Javascript 调试”。

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.

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..\platform-tools\adb devices

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..\platform-tools\adb logcat browser:V *:S

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.


更多详情: Logcat CLI tool docs .