How do I get Logcat for multiple devices running a

2020-03-01 04:06发布

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?

5条回答
走好不送
2楼-- · 2020-03-01 04:13

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
查看更多
我欲成王,谁敢阻挡
3楼-- · 2020-03-01 04:16

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.

查看更多
爷、活的狠高调
4楼-- · 2020-03-01 04:16

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.

查看更多
Juvenile、少年°
5楼-- · 2020-03-01 04:30

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.
查看更多
▲ chillily
6楼-- · 2020-03-01 04:32

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.

查看更多
登录 后发表回答