Between the resume (green triangle) and the stop (red square) there's a blue pause button, using the conventional consumer electronics pause iconography, two parallel vertical bars. This will do what (I think) you want.
pause button do PAUSE of the program stop button do ABORT of the program, it crashes jvm, it doesn't exit program, it's like kill program from task manager exit button do EXIT, like when you close any program by alt+f4
i need exit button in debug mode now to exit i use other external programs, this is very unconvenient
you really don't understand the difference between Stop and Exit? even if you don't understand, don't you think it's strange that in run mode there are 2 buttons Stop/Exit and in debug mode only 1 button Stop? maybe you'll remove Exit button from run mode too? it will be great joke!
Dear all, please excuse me for aggressiveness, but it's only because you mocking me
Would you explain what difference it makes in terms of how the "stopped" program behaves ?
the Exit command send Exit signal to the program and Stop command crashes jvm
in case of console program Exit is like "ctrl+c" in case of windowed program Exit is like "alt+f4" or like clicking small cross at the right top of the window (in linux its like kill or kill -TERM)
in both cases Stop is like open task manager, choose process and click "End process" button (in linux it like kill -9 or kill -KILL)
in case of Exit program can shutdown right way, e.g. it can save some data in file, or can send email that it was stopped in case of Stop jvm is aborted, program can't do anything
In Run mode, we launch your application through a special wrapper class which communicates with the parent instance of IntelliJ IDEA and can receive "shutdown" or "dump threads" commands. In Debug mode, no such wrapper class is used. You can effectively exit the application by evaluating "System.exit(0)" using the Alt-F8 (Evaluate Expression) dialog, and we'll probably add the button to do this for you automatically.
Dmitry, why are you mocking me?
you really don't understand the difference between Stop and Exit?
even if you don't understand, don't you think it's strange that in run mode there are 2 buttons Stop/Exit and in debug mode only 1 button Stop?
maybe you'll remove Exit button from run mode too?
it will be great joke!
-- Dmitry Jemerov Development Lead JetBrains, Inc. http://www.jetbrains.com/ "Develop with Pleasure!"
Long-running customer and fan of IntelliJ. We are currently in the process of getting some great Docker Postgres plugin working for Spring Boot Auto Configured applications, enabling us to work with just one database in all run-configurations.
However, to run this functionality in IntelliJ, it requires a Spring @PreDestroy to be triggered. Not only in Run-mode (which has the exit button), but also in Debug-mode (which does not have the exit button). As you are aware, the stop button just kills the JVM and @PreDestroy calls are ignored.
Wi Wi's suggestion is great. If you guys can implement a proper exit button for debug mode, beers here will be popped to your hail your benevolence.
+1 It's 2017 but the problem is still actual (checked on 2016.3.1 under Windows). It has become especially important with Spring Boot applications where gracefull exit covers significant part of program lifecycle logic.
OK... But the first issue is Fixed without there being a fix implemented?
My typical use-case is that I have lots of JavaExec tasks defined in Gradle and these run fine, but when exiting these from debug mode, it just terminates the debug session and then there is a 10s delay before the gradle daemon kills the debugged application.
In case of Gradle IDEA uses gradle tooling API's cancellation mechanism, so we just ask gradle to stop the task execution, but we can not manage the target process lifecycle.
I just tried to debug a spring-boot application. It did not stop at my breakpoint, and when I stopped the app using the stop button in the debug window, the application keeps running (I can still hit it in my browser). I tried spring-boot:stop, but the application keeps running. I closed IntelliJ completely, but the application keeps running! I have no idea how to stop it, other than to reboot my pc.
FYI (for those looking for a comment that states a solution)... this is a current workaround for non-Windows (also in my case it's an app running through Maven). Search for the PID of the Java process then execute this from an external command line:
kill -s SIGINT PID
Confirm then back in your IDE by looking at graceful shutdown messages when clicking on the root node within the Debug console that normally displays all output.
there's a "STOP" button which terminates the JVM is that what you seek ?
no
that button destroys jvm
it doesn't stop process
in run mode there are both buttons but unfortunately in debug mode there is only one
Between the resume (green triangle) and the stop (red square) there's a blue pause button, using the conventional consumer electronics pause iconography, two parallel vertical bars. This will do what (I think) you want.
Randall Schulz
Hello botWi,
Fourth button from the top ("Stop").
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
are you kidding me?
pause button do PAUSE of the program
stop button do ABORT of the program, it crashes jvm, it doesn't exit program, it's like kill program from task manager
exit button do EXIT, like when you close any program by alt+f4
i need exit button in debug mode
now to exit i use other external programs, this is very unconvenient
Dmitry, why are you mocking me?
you really don't understand the difference between Stop and Exit?
even if you don't understand, don't you think it's strange that in run mode there are 2 buttons Stop/Exit and in debug mode only 1 button Stop?
maybe you'll remove Exit button from run mode too?
it will be great joke!
Would you explain what difference it makes in terms of how the "stopped" program behaves ?
It may be just me but you seem overly agressive
Dear all, please excuse me for aggressiveness, but it's only because you mocking me
the Exit command send Exit signal to the program
and Stop command crashes jvm
in case of console program Exit is like "ctrl+c"
in case of windowed program Exit is like "alt+f4" or like clicking small cross at the right top of the window
(in linux its like kill or kill -TERM)
in both cases Stop is like open task manager, choose process and click "End process" button
(in linux it like kill -9 or kill -KILL)
in case of Exit program can shutdown right way, e.g. it can save some data in file, or can send email that it was stopped
in case of Stop jvm is aborted, program can't do anything
thanks for explaining :)
Hello botWi,
In Run mode, we launch your application through a special wrapper class which
communicates with the parent instance of IntelliJ IDEA and can receive "shutdown"
or "dump threads" commands. In Debug mode, no such wrapper class is used.
You can effectively exit the application by evaluating "System.exit(0)" using
the Alt-F8 (Evaluate Expression) dialog, and we'll probably add the button
to do this for you automatically.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks a lot
System.exit(0) - very good idea :)
the only trouble is that program should be paused at some breakpoint
it's strange, but i can't just click "Pause" and then evaluate system.exit(0)
Long-running customer and fan of IntelliJ. We are currently in the process of getting some great Docker Postgres plugin working for Spring Boot Auto Configured applications, enabling us to work with just one database in all run-configurations.
However, to run this functionality in IntelliJ, it requires a Spring @PreDestroy to be triggered. Not only in Run-mode (which has the exit button), but also in Debug-mode (which does not have the exit button). As you are aware, the stop button just kills the JVM and @PreDestroy calls are ignored.
Wi Wi's suggestion is great. If you guys can implement a proper exit button for debug mode, beers here will be popped to your hail your benevolence.
+1
It's 2017 but the problem is still actual (checked on 2016.3.1 under Windows).
It has become especially important with Spring Boot applications where gracefull exit covers significant part of program lifecycle logic.
+1
Effectively makes debugging shutdown-logic impossible
+1
This would be a neat and very wanted feature!
Is there any any youtrack issue for this?
Yes, https://youtrack.jetbrains.com/issue/IDEA-75946 and https://youtrack.jetbrains.com/issue/IDEA-171093
OK... But the first issue is Fixed without there being a fix implemented?
My typical use-case is that I have lots of JavaExec tasks defined in Gradle and these run fine, but when exiting these from debug mode, it just terminates the debug session and then there is a 10s delay before the gradle daemon kills the debugged application.
Is there an issue that covers this?
In case of Gradle IDEA uses gradle tooling API's cancellation mechanism, so we just ask gradle to stop the task execution, but we can not manage the target process lifecycle.
OK, so basically your waiting for https://github.com/gradle/gradle/issues/1128 ?
Yes, this feature should help.
https://github.com/gradle/gradle/issues/1128 was resolved two months ago. Any updates on the issue?
https://github.com/gradle/gradle/issues/5468 is still open.
I just tried to debug a spring-boot application. It did not stop at my breakpoint, and when I stopped the app using the stop button in the debug window, the application keeps running (I can still hit it in my browser). I tried spring-boot:stop, but the application keeps running. I closed IntelliJ completely, but the application keeps running! I have no idea how to stop it, other than to reboot my pc.
Kills the process? It looks like Spring/application specific issue not related to the IDE.
FYI (for those looking for a comment that states a solution)... this is a current workaround for non-Windows (also in my case it's an app running through Maven). Search for the PID of the Java process then execute this from an external command line:
Confirm then back in your IDE by looking at graceful shutdown messages when clicking on the root node within the Debug console that normally displays all output.
+1 for Wi Wi 's requested feature.
Why need to "Stop debug", when exiting the process being debugged would be both sufficient and right way.