Ren*_*ink 8 debugging intellij-idea
我正在使用创意2016.1.1并想知道为什么当我点击停止按钮时想法不会立即终止调试过程.
例如,使用这段代码重现它
public class Main {
public static void main(String[] args) {
int i = 0;
while (true) {
i++;
System.out.print("I'm still alive: ");
System.out.println(i);
}
}
}
Run Code Online (Sandbox Code Playgroud)
在循环开始之前设置断点.
启动调试会话,等到它休息并按红色停止按钮(CTRL-F2).
我希望该过程立即停止,并且它不会打印任何内容,但它会打印:
"C:\Program Files\Java\jdk1.6.0_38\bin\java" ....
Connected to the target VM, address: '127.0.0.1:54394', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:54394', transport: 'socket'
I'm still alive: 1
I'm still alive: 2
I'm still alive: 3
I'm still alive: 4
...
I'm still alive: 319
I'm still alive: 320
I'm still alive: 321
I'm still alive:
Process finished with exit code -1
Run Code Online (Sandbox Code Playgroud)
为什么这个过程没有立即停止?
还有另一种方法可以立即停止吗?
编辑
刚尝试了14.1.5的想法.该过程会按预期立即停止.似乎2016年引入了一个错误.
ahm*_*l88 12
Stop当在调试会话期间按下时,
IntelliJ Idea 的默认行为是不立即终止进程!。
但是,如果您需要更改此行为以立即终止调试进程
,我认为这应该是默认行为:)
您可以通过设置激活它:
Settings>>>Build, Execution, DevelopmentDebugger
| 归档时间: |
|
| 查看次数: |
2518 次 |
| 最近记录: |