Noo*_*oob 5 java debugging intellij-idea
IntelliJ 的调试器有什么方法可以始终:
a) 将结果设置为 true 或
b) 使 foo() 返回 true
我知道当我处于断点时我可以更改变量,但我希望它始终自动发生,而不更改代码,因为它是反编译的类。
public void foo() {
boolean result = false;
..
return result;
}
Run Code Online (Sandbox Code Playgroud)
在 行上添加断点return,在断点属性中取消设置“挂起”,将“评估并记录”设置为result = true。
如果方法中有多个return,则需要修改result所有方法之前的值。
| 归档时间: |
|
| 查看次数: |
53 次 |
| 最近记录: |