Skip to content

Commit feda8ca

Browse files
authored
debug: fix taskkill warning when stopping debugging of a C# app (microsoft#253069)
We didn't warn about this previously, and I accidentally made some changes that avoided the implicit 'catch' we had here. Fixes microsoft#253026
1 parent 42fd68f commit feda8ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/debug/node/debugAdapter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter {
289289
// processes. Therefore we use TASKKILL.EXE
290290
await this.cancelPendingRequests();
291291
if (platform.isWindows) {
292-
return killTree(this.serverProcess!.pid!, true);
292+
return killTree(this.serverProcess!.pid!, true).catch(() => {
293+
this.serverProcess?.kill();
294+
});
293295
} else {
294296
this.serverProcess.kill('SIGTERM');
295297
return Promise.resolve(undefined);

0 commit comments

Comments
 (0)