Intellij IDEA doesn't stop test
已回答
Intellij IDEA 2017.3.4.
I'm debugging a Java gradle based unit test by clicking the green arrow on the left of my unit test method name and clicking the Debug option.
Standing at a breakpoint inside my test method, I click stop (Ctrl+F2).
Here, looks like IDEA only detaches it's debugger so test execution continues anyway - this can be proved if you print some messages after your breakpoint, you will see them in console printed. While I'd expect IDEA to terminate everything and I shouldn't get the messages going after by breakpoint printed.
Is it a bug or expected behavior (which would be very strange)?
请先登录再写评论。
Hello,
This behavior is by design.You could enable "
Kill the debug process immediately" option in "Settings | Build | Debugger". Also see related issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-164593Thanks.
I added my considerations to the issue page.
You are welcome!
I just enable the option "Kill the debug process immediately", but it does not works in springboot junit test.
What should I do?
--------version-----------
IntelliJ IDEA 2018.3.5 (Ultimate Edition)
Build #IU-183.5912.21, built on February 26, 2019
Licensed to xinkun zhang
Subscription is active until August 27, 2019
JRE: 1.8.0_152-release-1343-b28 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Hello. Please provide exact steps to reproduce a problem.