28

I'm "debugging" a Xamarin Android application that only has a problem when a debugger is not attached, thus, I'm having to fall back on logging to figure out what the problem is. However, doing adb logcat from the command line is quite painful. The constant window scrolling is quite troublesome. Xamarin has some integration for logcat in Visual Studio, but in practice, I find it's too buggy to use. From what I can tell online, it looks like everyone uses some plugin for logcat in Eclipse. However, I don't have or want Eclipse.

Is there any tool out there that presents logcat in a nice and easy to filter (and that isn't constantly scrolling) way? Preferably in a GUI since I have to sift through quite a few messages from a single run of trying to figure this bug out

TT--
  • 2,956
  • 1
  • 27
  • 46
Earlz
  • 62,085
  • 98
  • 303
  • 499
  • Have you checked [logcat-gui](https://code.google.com/p/logcat-gui/)? – Piovezan Oct 03 '13 at 20:33
  • 1
    On the command line, `grep` is your friend! Should be built-in on Linux or OSX, and available via mingw or Cygwin on Windows. – Chris Stratton Oct 03 '13 at 20:42
  • @ChrisStratton The thing is I need to be able to see the messages as they show up. That's how I know if I've waited long enough for the bug to appear or not. I'm pretty sure Windows doesn't have a `|` like operator on their crappy shell... although, maybe cygwin could handle it – Earlz Oct 03 '13 at 20:48
  • 1
    You will see messages almost instantly. Windows does have a | operator. What it doesn't normally have is a grep, but you can get one from many sources. This is not a gui solution of course - it just happens to be very convenient to customize. – Chris Stratton Oct 03 '13 at 20:51
  • 1
    https://github.com/wangfei1975/superlog – Paolo Mar 19 '18 at 21:37

2 Answers2

55

If you need a GUI, the Android SDK delivers a filterable logcat display tool in the Device Monitor.

Execute monitor.bat in the android-sdk\tools folder to bring it up. You can en- or disable scrolling with the Arrow-Down symbol on the right of the filter bar.

dst
  • 3,307
  • 1
  • 20
  • 27
2

For anyone using Android Studio:

The top answer is useful, but I found if you run monitor.bat from android-sdk\tools while Android Studio is already running, you will get conflict on the port:

"Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences."

So it was preferable to run it from the Android Studio menu:

Tools > Android > Android Device Monitor

TT--
  • 2,956
  • 1
  • 27
  • 46