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:
- Run the app on Device 1
- Run the app on Device 2
- Open a new window (window/new)
- 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?
This is a very late reply but probably you didn’t find a solution.
Click Window —> Show View —> Other —> Android —> Devices.
Simply click on a device to switch to its logcat.
You can try to use adb in two different console windows to get the logcat for each one.
in console window 1: adb -s <device01_serial> logcat in console window 2: adb -s <device02_serial> logcat
As takecare said.
This is how you can do it:
- Find the device id’s of Device 1 and Device 2. Do this by opening a shell prompt and typing the command
You’ll get a list of connected devices and their id’s.
- 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.
- Open another shell and do the same as in step 2, but for you Device 2.
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.
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.