GitBash 的 shell 命令行工具,可以试用grep命令过滤:
注意,需要把 adb.exe 添加到环境变量中,如下:
1 2 3 4 5 6 7 8 9 10 11 12
| adb.exe devices
adb.exe -s 340782513600AP8 shell pm list packages -3
adb.exe -s 340782513600AP8 logcat | grep com.test.masablazorapp
adb.exe -s 340782513600AP8 logcat -v time > e:\log.txt *:E
|
日志级别:
1 2 3 4 5 6 7
| V:详细(最低优先级) D:除错 I:信息 W:警告 E:错误 F:严重 S:静默(最高优先级,未曾输出过任何内容)
|
日志示例如下:
1 2 3 4 5 6 7 8 9 10
| 10-12 09:01:30.727 6714 6714 V GraphicsEnvironment: ANGLE Developer option for 'com.test.masablazorapp' set to: 'default' 10-12 09:01:30.727 6714 6714 V GraphicsEnvironment: ANGLE GameManagerService for com.test.masablazorapp: false 10-12 09:01:31.071 6756 6756 F DEBUG : Cmdline: com.test.masablazorapp 10-12 09:01:31.071 6756 6756 F DEBUG : pid: 6714, tid: 6714, name: y.masablazorapp >>> com.test.masablazorapp <<< 10-12 09:01:31.071 6756 6756 F DEBUG : #01 pc 0000000000039f1c /data/app/~~FK2zjiAFbo4PYevfAQsr1Q==/com.test.masablazorapp-25GJnPc9BdbEbWkerGRRlQ==/lib/arm64/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::mono_log_handler(char const*, char const*, char const*, int, void*)+144) (BuildId: a8466986ce0a58d7eb3a452ef823ee9785ed332d) 10-12 09:01:31.071 6756 6756 F DEBUG : 10-12 09:01:31.071 6756 6756 F DEBUG : 10-12 09:01:31.071 6756 6756 F DEBUG : 10-12 09:01:31.071 6756 6756 F DEBUG : 10-12 09:01:31.071 6756 6756 F DEBUG :
|
参考:
MAUI APK安装到其他手机闪退问题