In my previous post I showed how you can use adb and logcat to help debug your Mono Android application. Well I have further refined the ability to use logcat with filters to get rid of all the cruft, with the following command you will only see Mono Android related issues for your application:
|
1 |
cmd /c "C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" logcat setprop debug.mono.trace ActivityManager:* WindowManager:* AndroidRuntime:* MonoDroid:* dalvikvm:* mono *:E *:S |
Each filter is defined by <name>:<wild card>, so this filters logcat by “ActivityManager”, “WindowManager”, “AndroidRuntime”, “dalvikvm”, “mono” and the “E”, and “S” are types of log activity which are reversed because we don’t care what they come from since we already defined that filter, but instead we want ALL types for “E” and “S” of the filters we just defined.
Just drop it in a batch file on your desktop and launch it, keep it open the entire time you do your development. Occasionally you might lose your adb connection, if that happens just type adb logcat in the shell to restart it over again.
Update: Added MonoDroid:* to capture some missing log information…
Related posts:

