Skip to content

Commit 1ff1618

Browse files
authored
Merge pull request #306 from PowerShell/daviwil/fix-output
Fix issue with debugger output not being written for short scripts
2 parents e70d3b2 + 295c901 commit 1ff1618

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PowerShellEditorServices.Protocol/Server/DebugAdapter.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ protected Task LaunchScript(RequestContext<object> requestContext)
7979
.ExecuteScriptAtPath(this.scriptPathToLaunch, this.arguments)
8080
.ContinueWith(
8181
async (t) => {
82-
Logger.Write(LogLevel.Verbose, "Execution completed, terminating...");
82+
Logger.Write(LogLevel.Verbose, "Execution completed, flushing output then terminating...");
83+
84+
// Make sure remaining output is flushed before exiting
85+
await this.outputDebouncer.Flush();
8386

8487
await requestContext.SendEvent(
8588
TerminatedEvent.Type,

0 commit comments

Comments
 (0)