问题描述
只需升级最新的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:
-
单击logcat右侧的Edit Filter Configuration
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文件! Ohy Myy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!