I expected this to be a simple task, but I'm surprised to find no answers for this.
Let me clarify:
I do not want to call
adb logcat -c
manually. In fact, I'm not even using the command line to view LogCat, so I don't think this is possible (edit: actually, it is, by running the command in a separate command line...but I don't want to do that). I'm using Eclipse to view LogCat.I do not want to click button
Clear Log
each time. That's what I'm doing now.I do, programatically or through Eclipse's Run/Debug configurations or however, want a way to automatically clear LogCat each time I hit Ctrl+F11 to run my Android project. My LogCat is getting cluttered. Ctrl+F11 isn't important - it's just my shortcut to Debug. I'd like to clear LogCat on Debug/Run.
I'm using Eclipse on Windows 7 and debugging with a Nexus One (not an emulator).
I've tried:
Modifying Debug/Run configurations. (
Project
->Properties
->Run/Debug Settings
->Edit Launch Configurations
) Running from the emulator is the only way to addAdditional Emulator Command Line Options
. But I'm running from the actual Android device, so I can't access those options.Builders? I wasn't sure how to use this. (
Project
->Properties
->Builders
). How would I use this to clear LogCat each time I run?
I'm beginning to think I have to write a macro program to hook Ctrl+F11 when the active foreground process is eclipse.exe
to move my cursor to the Clear Log
button and click it. I guess clearing LogCat automatically is too much to ask for.