How to view Android LogCat output from the OS command line

From time to time I have a problem with Android Studio where it won’t show the logcat output of an app I’m trying to debug. I haven’t been able to figure out why that is, so what I do instead is look at my logcat output from my operating system’s command line.

So, as a short tip, if you want to see Android LogCat output from your command line, just run this Android adb command from your Unix/Linux command line:

$ adb logcat

When you're developing an Android app, it's a good idea to keep this command open and running in a separate window, though of course you can also usually see this output in the Android Studio LogCat view.

Note that this command may not work if you have multiple devices connected, such as an Android emulator and a physical Android device connected on a USB port. But if you have one or the other it seems to work just fine.