爱 Google

debug
过滤不需要的信息
- Show package
- Show process
- show date time

你还可以使用日志过滤器
- log tag
- log message
- package name

折叠无用的信息

- 折叠无用信息

-
展开信息
让运行中的app快速进入debug
(Attach Debugger to Android Process
)

拖动断点让debug继续向下运行

在debug中添加断点条件
比如我们在一个for循环中只想要
i==5
的值你们你就可以在该断点处添加i==5

在指定断点时禁用我们不需要的断点

- 当我们只想得到30,31行断点的内容时
点击设置更多

禁用我们不需要的断点

断点设置总结

- 取消断点(快捷键 Alt+点击 Mac Option+点击)
-
all
debug使用线程 -
thread
让debug只运行当前子线程
(解决的线程debug的烦恼)
-
- 给断点添加条件
4.禁用某个断点
debug回退
如下图当你再次查看i=0的值或者你增加了新的代码时你可以点击如下按钮可以重新回到这个方法

debug 持续追踪你所关注的项目
如果你想持续关注一个项目debug使用此方法你会发现如下图左下中会持续标注你所关注的项目当你点击该标注就可以直接跳转过去了



查找你想要的debug内容

*0当你想确定i的值 你可以输入以下表达式debug会返回给你boolean结果

如果你收到一份包含调用栈的bug报告你可以使用如下方法


网友评论