How can I print messages (like a flag) to the Eclipse console (or log) when developing and debugging an Android app
It can be changed by going to Windows --> Preferences --> Run/Debug --> Console and then unchecking "Limit Console Output" which is ON by default. This works on STS any version too. This would help printing complete console output. For a Mac it is Eclipse > Preferences > Run/Debug > Console.
Inside Eclipse -> Click on "Window" Select "Show View" Then select "Console" If you cannot see console in the list, select "Other" and then search for "console' in new dialog at top and select "Console"
] to ensure that the current console remains on top of all other consoles.
Rather than trying to output to the console, Log
will output to LogCat which you can find in Eclipse by going to: Window->Show View->Other…->Android->LogCat
Have a look at the reference for Log
.
The benefits of using LogCat are that you can print different colours depending on your log type, e.g.: Log.d
prints blue, Log.e
prints orange. Also you can filter by log tag, log message, process id and/or by application name. This is really useful when you just want to see your app's logs and keep the other system stuff separate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With