Skip to content

Commit dff3538

Browse files
authored
Attempt to terminate the process normally (#579)
Fixes microsoft/vscode-java-debug#1274
1 parent 4cb23d2 commit dff3538

File tree

1 file changed

+3
-1
lines changed
  • com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core

1 file changed

+3
-1
lines changed

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/DebugSession.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public void detach() {
119119

120120
@Override
121121
public void terminate() {
122-
if (vm.process() == null || vm.process().isAlive()) {
122+
if (vm.process() != null && vm.process().isAlive()) {
123+
vm.process().destroy();
124+
} else if (vm.process() == null || vm.process().isAlive()) {
123125
vm.exit(0);
124126
}
125127
}

0 commit comments

Comments
 (0)