开发者

Android Logcat not showing logs when I switch devices

I am trying to use Logcat to help diagnose my android issues. I frequently have a phone plugged in AND an emulator running. Sometimes I debug on the emulator, sometimes I debug on the phone, or maybe even a third device.

Logcat does not continue to s开发者_如何学Chow messages after a device is switched. How can I specify what Logcat does or force it to resume logging without restarting eclipse?

Insight appreciated


I've noticed this at times. Usually one of two things does the trick. First, open the Devices view, verify that the new device is showing, and then switch back to Logcat. That seems to kick Logcat into action again.

If that doesn't work, then in the Devices view menu, select "Restart ADB" (I think that's what it's called; I don't have it open at the moment).

If even that doesn't work, then kill and restart the ADB server from the command line and repeat the above.


If you are using Eclipse, switch to the DDMS perspective. There, logcat will be showing the log of the selected device in the devices View (Window -> Open perspective -> Other -> DDMS)


You coupld use the CLI for ADB and reattach the debug process to your switched device. Then Logcat will pick the debug msgs from that connected device. Whatever device is actively connected to ADB will output through Logcat

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜