admin管理员组文章数量:1530842
I'm using idea 2016.1.1 and wonder why idea does not kill the debug process immediately when I click the stop button.
E.g. use this piece of code to reproduce it
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);
}
}
}
Set a breakpoint before the loop begins.
Start a debugging session, wait until it breaks and press the red stop button (CTRL-F2).
I would expect that the process is stopped immediately and that it does not print anything, but it prints:
"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
Why is the process not stopped immediately?
Is there another way to force an immediately stop?
EDIT
Just tried it with idea 14.1.5. The process stops immediately as expected. It seems that a bug was introduced with 2016.
解决方案
The bug IDEA-155007 is fixed in 2016.3 (163.7743.44). I've just verified it.
版权声明:本文标题:idea停止调试,为什么intellij想法不会立即终止调试过程? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1725429727a1022765.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论