Skip to content

Commit f2d8cf1

Browse files
committed
Handle sendKeyPress events for temporary integrated consoles
1 parent 98f2b44 commit f2d8cf1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/session.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,20 @@ export class SessionManager implements Middleware {
270270
sessionPath,
271271
sessionSettings);
272272

273+
// Similar to the regular integrated console, we need to send a key
274+
// press to the process spawned for temporary integrated consoles when
275+
// the server requests a cancellation os Console.ReadKey.
276+
//
277+
// TODO: There may be multiple sessions running in parallel, so we need
278+
// to track a process per session, but that already isn't being done.
279+
vscode.debug.onDidReceiveDebugSessionCustomEvent(
280+
e => {
281+
if (e.event === "powerShell/sendKeyPress") {
282+
this.debugSessionProcess.sendKeyPress();
283+
}
284+
}
285+
);
286+
273287
return this.debugSessionProcess;
274288
}
275289

0 commit comments

Comments
 (0)