Stopping application does not work
Hi,
I'm experiencing a rather severe issue ever since I updated to Windows 10.
Here is a simple example:
1. I place a debug point between two simple commands, run the script in debug mode and let the application pause there
Log message printed as expected.
2. Hit the red square (STOP) command to terminate the program.
I would expect that the application would stop immediately.
3. Instead the console looks like this:
The second command AFTER the breakpoint was executed anyway.
What am I missing here? Even longer scripts keep running regardless that I hit the stop button, there is no way to actually terminate a process in debug mode. This is really severe.
Do you have any suggestions or is there something trivial I am missing?
Thanks,
Peter
Please sign in to leave a comment.
Try adding Thread.sleep(1000); before "End" as a workaround.
See https://youtrack.jetbrains.com/issue/IDEA-155007#comment=27-1413755 for the problem background.
Hi Serge
Like I said: "Even longer scripts keep running regardless that I hit the stop button". Thread sleep does not do anything. I am not looking for a workaround but a way to eliminate the issue all together.
Thank you anyway :)
Can't confirm that it doesn't help:
Hi Serge Baranov. This issue still seem to exist in IntelliJ IDEA 2024.1.4. I was pretty confused that my application continued to execute things even though I did hit the STOP button. Putting some sleep in does not really help since I want to be able to end my application process at any point in time. Otherwise I would need to put sleeps after each line :).
Not sure why I never noticed this before working for many years with IntelliJ. Maybe something is off in the current version?
Thanks and best regards, Tom
After search a bit more I found this helpful youtrack entry https://youtrack.jetbrains.com/issue/IDEA-155007#comment=27-1680482.
There is a setting unter “Build, Execution, Deployment” → “Debugger” to “Kill the debug process immediately” in IntelliJ. This helped to achieve the expected behavior. Not sure why this is not the default and what negative side effects this flag has. Seems a lot of people wonder about this and expect the immediate stop.
Hello Tom,
Soft kill is used by default in all our runners because it allows process to cleanup resources (remove temp files, close database or file descriptors, correctly flush caches and so on). And this behaviour is better and expected for most of our users.