-
Notifications
You must be signed in to change notification settings - Fork 377
Closed
microsoft/java-debug
#579Description
When stopping a debugging session, the application will be killed immediately without running shutdownHook
code. There is the same discussion in the GO Lang project (golang/vscode-go#120).
It would be nice to have the chance to decide, how the application will be killed (SIGKILL
vs SIGTERM
). Both are valid use-cases. Maybe it's even possible to have options on the STOP button of the debug panel. As we have multi-project workspaces, it really depends on the application (even situation) what you need.
Environment
- Operating System: MacOS (But same on Windows/Linux)
- JDK version: 11
- Visual Studio Code version: 1.74.0
- Java extension version: v0.25.7
- Java Debugger extension version: v0.47.0
Steps To Reproduce
- Made a java application with an
shutdownHook
(Runtime.addShutdownHook) - Start the application
- Stop the application by clicking the STOP button in the debug panel.
Current Result
The shutdownHook
will not be executed.
Expected Result
The shutdownHook
will be executed. (At least if the user chooses to)
Additional Informations
N/A
roland-ewald, thomasredlin, OlliAtWork, Toromtomtom, martin-garbe and 11 more