How to easily view and filter Android's logcat in Windows?

雨燕双飞 提交于 2019-12-20 11:07:19

问题


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


回答1:


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.




回答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



来源:https://stackoverflow.com/questions/19168643/how-to-easily-view-and-filter-androids-logcat-in-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!