From 59dba06c96d8f39267a0776fe51cff27e901fcf0 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Thu, 18 Jun 2020 09:27:07 -0700 Subject: [PATCH] Emit 'terminated' event if PSES is restarted. --- src/debugAdapter.ts | 2 ++ 1 file changed, 2 insertions(+) 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(); }