Chapter 4: Debugging

Source: Internet
Author: User

Document Content
Use console APIs in Android Browser
Use console APIs in WebView
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 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.