"Android" How to use Android's Logcat "finishing"

Source: Internet
Author: User

Logcat is a command-line tool in Android that can be used to get log information for a program . development debugging and testing positioning Bugs are very useful

There are two ways to achieve The purpose of viewing log.

An Eclipse integrated DDMS plugin

1 Install Eclipse Environment, JDK, etc., note the version and number of digits match

2 Installing DDMS

3 Open Eclipse, start Ddms, as follows:

4 found LogCat (Windows->show view->logcat), that is, you can see the log, click "+" to add filters, you can set the filter content and log level, you can debug.

Two command lines using the ADB command

100 degrees to download the ADB toolkit, unzip, from the command window into the Adb.exe path, as follows can be used successfully:

2 Connect your phone and turn on USB debugging. Enter ADB logcat at the command line to see the log scrolling

3rd The log is very large, so we need a grep command similar to Linux to locate our focus.

Enter adb logcat|grep "MyLog" prompt on the command line: grep is not an internal command or an external command. We can install Cygwin (a UNIX emulation environment running on the Windows platform) to achieve the effect of using only grep commands,

You can also write files with redirects, etc., and view them later.

4 Installation of Cygwin: encyclopedia data.

"Android" How to use Android's Logcat "finishing"

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: info-contact@alibabacloud.com 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.