Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically clearing LogCat on each Eclipse Debug/Run?

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 add Additional 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.

like image 810
Jason Avatar asked Mar 02 '12 23:03

Jason


1 Answers

Some commercial releases of Eclipse (e.g. Adobe's Flash Builder) have this as an option in the preferences panel. It's probably a relatively trivial thing to implement, they just didn't bother.

You should request this feature, if enough people do it they might add it to the next release:

http://www.eclipse.org/contribute/

like image 84
aeldron Avatar answered Oct 03 '22 03:10

aeldron