Eclipse Android - Logcat 清除速度太快
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12442892/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Android - Logcat Clearing too Fast
提问by nomaam
I have been using Eclipse for Android (most up to date version), for a while with no problems with the Logcat. For an unknown reason, Logcat is no longer retaining the debug messages. Logcat is getting cleared in about 5 seconds . Is there any way to prevent the auto-clearing of Logcat messages? Otherwise I am unable to read the messages.
我一直在使用 Eclipse for Android(最新版本),一段时间以来 Logcat 没有问题。由于未知原因,Logcat 不再保留调试消息。Logcat 在大约 5 秒内被清除。有什么办法可以防止自动清除 Logcat 消息?否则我无法阅读消息。
回答by 323go
Change your LogCat buffer length:
更改您的 LogCat 缓冲区长度:
Window / Preferences / Android / LogCat / Maximum number of LogCat messages in buffer _
Window / Preferences / Android / LogCat / 缓冲区中 LogCat 消息的最大数量_
Set it to 0 for unlimited size (thanks to the commenter below)
将其设置为 0 以获得无限大小(感谢下面的评论者)
回答by ivan.panasiuk
Its happens when there is too many logcat rows. It automatically delete all after reaching maximum number defined in preferences (5000 rows by default in Eclipse), both filtered and not filtered rows.
当 logcat 行太多时会发生这种情况。在达到首选项中定义的最大数量(Eclipse 中默认为 5000 行)后,它会自动删除所有已过滤和未过滤的行。
Fortunetly, you can change maximum number in:
幸运的是,您可以更改最大数量:
Window > Preferences > Android > LogCat > Maximum number of LogCat messages in buffer
窗口 > 首选项 > Android > LogCat > 缓冲区中 LogCat 消息的最大数量
I have the same problem, but only with Sony Xperia C and Android 4.2.2. Every phone have different level of logging.
我有同样的问题,但仅限于 Sony Xperia C 和 Android 4.2.2。每部手机都有不同级别的日志记录。
回答by JunR
You can use breakpointswhere you print the messages and debug them by F6/F8keys after that. So you can see all the messages by step.
您可以在打印消息的地方使用断点,然后通过 F6/F8键调试它们。这样您就可以逐步查看所有消息。