Volleynerd Knowledge Base

Wednesday, January 20, 2010

Android App - Debug Logging


Sort of equivalent to .NET Debug.WriteLine( )

import android.util.Log;

sprinkle the following throughout the code
Log.d( "Some Category", "blah blah message" )

Couldnt get NetBeans to show me the output. Using Android "adb" dev tool (from SDK tools dir).

adb devices
adb logcat

Can filter output with something like the following:
adb logcat XmlNode:D *:S
(Above says show DEBUG output for XmlNode category, and SILENT for everything else)


blog post about it here
ADB documentation here



Comments: Post a Comment

Home