使用 adb 命令获取指定应用的日志

# 查找当前位于前台的应用包名(Windows)
adb shell dumpsys window | findstr mCurrentFocus

# 查找 pid(使用上一步查到的包名)
adb shell pidof com.CompanyName.AvaloniaTest

# 显示日志(使用上一步查到的 pid)
adb logcat --pid=202020

 

posted @ 2024-11-15 13:23  不是豆豆  阅读(516)  评论(0)    收藏  举报
友情链接:迷途