diff --git a/src/debugAdapter.ts b/src/debugAdapter.ts index b621db963a..0012a4a290 100644 --- a/src/debugAdapter.ts +++ b/src/debugAdapter.ts @@ -53,6 +53,7 @@ export class NamedPipeDebugAdapter implements DebugAdapter { // When the socket closes, end the session. this._debugServiceSocket.on("close", () => { this.dispose(); }); + this._debugServiceSocket.on("end", () => { this.dispose(); }); } public handleMessage(message: DebugProtocolMessage): void { @@ -66,6 +67,7 @@ export class NamedPipeDebugAdapter implements DebugAdapter { public dispose() { this._debugServiceSocket.destroy(); + this._sendMessage.fire({ type: 'event', event: 'terminated' }); this._sendMessage.dispose(); }