Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 5237aae

Browse files
committed
disconnect only in attach mode; fix for #6
1 parent 71b819f commit 5237aae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/node/nodeDebug.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,11 @@ export class NodeDebugSession extends DebugSession {
735735
if (!this._inShutdown) {
736736
this._inShutdown = true;
737737

738-
this._node.command('disconnect'); // we don't wait for reponse
738+
if (this._attachMode) {
739+
// disconnect only in attach mode since otherwise node continues to run until it is killed
740+
this._node.command('disconnect'); // we don't wait for reponse
741+
}
742+
739743
this._node.stop(); // stop socket connection (otherwise node.js dies with ECONNRESET on Windows)
740744

741745
if (!this._attachMode) {

0 commit comments

Comments
 (0)