android中的System.out.println?
- 作者: 超级爱范儿
- 来源: 51数据库
- 2023-01-29
问题描述
有什么方法可以在 android studio 中查看我的打印语句而不显示时间和目录?当文本占用如此多的空间时,它会非常分散注意力且难以调试.
Is there any way that I can view my print statements in android studio without displaying the time and directory? It's extremely distracting and hard to debug when that text is taking up so much space.
推荐答案
在 Android Studio 的 Android Monitor 视图中(在 1.3 版测试),在logcat"选项卡内的垂直工具栏中,你会发现一个齿轮形工具栏按钮.单击它,您将获得一个带有复选框的配置 LogCat Header"对话框,允许您打开和关闭显示的各个部分:
In the Android Monitor view in Android Studio (tested on Version 1.3), in the vertical toolbar inside the "logcat" tab, you will find a gear-shaped toolbar button. Click that, and you will get a "Configure LogCat Header" dialog with checkboxes to allow you to toggle on and off various pieces of what gets displayed:
取消选中您不想要的项目(例如,放映时间").请注意,除了您自己记录的内容之外,LogCat 不显示任何目录".我的猜测是,目录"指的是包名.
Uncheck the items that you do not want (e.g., "Show time"). Note that LogCat does not show any "directory" except with respect to something you log yourself. My guess is that by "directory" you are referring to the package name.
这似乎不会影响现有消息,但应该会影响任何未来附加到 LogCat 脚本的消息.
This does not appear to affect existing messages, but should affect any future ones appended to the LogCat transcript.