Document Content
Use console APIs in Android Browser
Use console APIs in WebView
Reference
Debugging
If you are developing a web application for Android, you can use the console's JavaScript API (the console JavaScript APIs) to debug your Javascript code and output the information to logcat. If you are familiar with using Firebug or Web Inspector to debug web pages, you should be familiar with using the console (such as console. log. The Android Webkit framework supports most of the same APIs. Therefore, when debugging in an Android browser or WebView, you can receive logs from the web page.
Use console APIs in Android Browser
Logcat
Logcat is a tool used to dump system information logs. This information includes the stack path when the device throws an error, the log information written by your application, and the log information written by using the JavaScript console API.
To Run logcat and view information, Run adb logcat from the tools/directory of your Android SDK, or select Device> Run logcat from DDMS. When using ADT plugin for Eclipse, you can also open the Logcat view to View the logcat information. The open path is Window> Show view> Other> Android> Logcat ..
In Debugging, you can obtain