本文介绍了当应用程序崩溃时,Android Studio ADB 会清除 logcat 文件!哦我的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚升级了最新的 Android Studio.现在当应用程序崩溃时,日志文件 adb logcat 消失.它不仅停止记录,整个日志似乎也突然被抹掉了.对于调试来说不太酷.我需要设置日志缓存大小吗?还注意到调试器需要很长时间来收集其数据,但这可能特定于我正在测试的程序.

Just upgraded latest Android Studio. Now when app crashes, the log files adb logcat disappear. It not only stops recording the whole logs seems to be suddenly wiped out. Not too cool for debugging. Do I need to set log cache size or something? Also noticed that debugger takes a very long time to collect its data, but this might be specific to the program I am testing.

推荐答案

当我使用Android Studio时遇到同样的问题,我通过一个简单的解决方案解决了这个问题:设置logcat过滤器:

When I use Android Studio I face the same problem, I resolve this problem by a simple solution: Set the logcat filter:

  1. 点击 logcat 右侧的 Edit Filter Configuration

  1. Click Edit Filter Configuration at right of logcat

在包名称字段中,设置您的应用程序 ID,然后单击确定.

in the package name field, set you application ID, and click OK.

下次应用崩溃时,logcat 不会消失.

Next time the app crash, the logcat will not wipes out.

很高兴我的声誉在10以上,我可以直接在我的答案中添加照片.

Very Glad my reputation is above 10, and I can add photo in my answer directly.

这篇关于当应用程序崩溃时,Android Studio ADB 会清除 logcat 文件!哦我的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 09:42