• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps System.out.print Equivalent

Hi - I want to check the value of a particular integer variable in Android but Im not sure how. I know that in java you would use "System.out.println( value );" to check the value output but is there an equivalent in Android?

I have read about using the DDMS for such a purpose but am unsure about how to do about it as when I use 'Log.v( TAG, "Value is "+value );" doesn't actually appear on the DDMS log screen.

What am I doing wrong?
 
I thought this question would get more of an appropriate audience in the developer's section. :)
 
Using the Android's Log class should output to the LogCat screen, if this is the screen you mean. You can display the LogCat at your terminal using the command adb logcat (adb is located in the platform-tools folder in you android-sdk install dir). By using no filter params you see every log message.
The other way to check this is setting a breakpoint at the Log.v line. It might be possible that this could will never be executed. When the breakpoint is set you can the values of all your variables within scope.
 
Back
Top Bottom