Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Logcat for multiple devices running at the same time in Eclipse

I have two android devices connected to the same station. I would like to view the logcat for both while running them in debug mode in eclipse.

I have had SOME luck with the following steps:

  1. Run the app on Device 1
  2. Run the app on Device 2
  3. Open a new window (window/new)
  4. In the new window, open view logcat

About 40% of the time this results in in each eclipse window showing data from a different phone... but not always. It seems to be almost a luck-of-the-draw kind of thing. More often than not both windows show the same device. If I open device viewer and select a device in either window both change.

How can I do this all the time?

like image 555
djc6535 Avatar asked Jan 04 '13 18:01

djc6535


5 Answers

This is a very late reply but probably you didn't find a solution.

Solution:

Click Window ---> Show View ---> Other ---> Android ---> Devices.

Simply click on a device to switch to its logcat.

like image 172
VanDir Avatar answered Oct 26 '22 06:10

VanDir


You can try to use adb in two different console windows to get the logcat for each one.

Example:

in console window 1: adb -s <device01_serial> logcat
in console window 2: adb -s <device02_serial> logcat
like image 33
takecare Avatar answered Oct 26 '22 04:10

takecare


As takecare said.

This is how you can do it:

  1. Find the device id's of Device 1 and Device 2. Do this by opening a shell prompt and typing the command adb devices You'll get a list of connected devices and their id's.
  2. Run the command adb -s [device_1_id] logcat Where [device_1_id] is the device id of your Device 1 which you obtained in the first step.
  3. Open another shell and do the same as in step 2, but for you Device 2.
like image 22
Paul Avatar answered Oct 26 '22 04:10

Paul


I don't believe there's a good way to do this. You can approximate it though. One option is (as other answers have suggested) to use logcat from adb. This obviously isn't as pretty. Another is to run DDMS directly (instead of through Eclipse) for your second window. This gets you pretty close and gives you two logcat windows each with their own device selectors. The DDMS executable is found in the tools folder of your Android installation.

like image 38
kabuko Avatar answered Oct 26 '22 06:10

kabuko


Here's the way I handle switching between device's logcat output using Juno M20120914-1800.

Unfortunately it is not automatic, but it is at least the most reliable way I've found yet, and once you get used to doing it, it's not that bad.

I click on the device icon in the toolbar.

I click on the device name.

Then I click on logcat again and it will show the device I selected.

It seems like this should be a feature, to be able to monitor more than one device/AVD at a time.

like image 36
logray Avatar answered Oct 26 '22 06:10

logray