user1154644 user1154644 - 1 year ago 206
Android Question

Android print stack trace

How can I get the equivalent of a printStackTrace in android? I know I can log an error, by passing in a tag name and a String to the logging method, but that just gives me a nullpointerexception. If I call e.printStackTrace(), where is this data printed to?

Answer Source

If you are using eclipse make sure you have LogCat window opended. You can find it under

Window-> Show View-> Other -> Under Android -> LogCat

updated:2014 July

OR if you are using Android Studio you can find it under

Window menu -> Show view -> Logcat

LogCat is like a console in normal JAVA. Your e.printstacktrace() would appear in LogCat as well.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download