Debugging using Logcat

Logcat :

The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers, which then can be viewed and filtered by the logcat command.

Logcat can be viewed from commend line or from eclipse.

navigate to <android sdk/platform-tools> and then type ./adb logcat to view logcat from command line.

Open Eclipse and select Window->show view->others->Android->Logcat you will get this window.

The Logcat is capable of identifying the line number which has the error. In this above Logcat sample take a close look at this line

02-24 16:47:18.200: W/System.err(13914):     at android.org.Weight_mode.getCount(Weight_mode.java:640)

It says there is a warning in getCount function which is in line number 640 in weight_mode.java file. So branch to that line and make the required changes.

Advertisements

2 thoughts on “Debugging using Logcat

  1. Pingback: Android Development Tools | muthumanict

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s