Skip to content

Commit 301ee69

Browse files
committed
Fix DebugService.Abort() deadlock
With the default value of `true` for `shouldWaitForExit` this would deadlock because it exepcted the pipeline execution thread to clean it up...except it was waiting in the pipeline execution thread.
1 parent 5d5d7bc commit 301ee69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PowerShellEditorServices/Services/PowerShellContext/PowerShellContextService.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ public void AbortExecution(bool shouldAbortDebugSession)
12481248
this.versionSpecificOperations.StopCommandInDebugger(this);
12491249
if (shouldAbortDebugSession)
12501250
{
1251-
this.ResumeDebugger(DebuggerResumeAction.Stop);
1251+
this.ResumeDebugger(DebuggerResumeAction.Stop, shouldWaitForExit: false);
12521252
}
12531253
}
12541254
else
@@ -1940,7 +1940,7 @@ private void PowerShellContext_ExecutionStatusChangedAsync(object sender, Execut
19401940

19411941
private IEnumerable<TResult> ExecuteCommandInDebugger<TResult>(PSCommand psCommand, bool sendOutputToHost)
19421942
{
1943-
this.logger.LogTrace($"Attempting to execute command(s)a in the debugger: {GetStringForPSCommand(psCommand)}");
1943+
this.logger.LogTrace($"Attempting to execute command(s) in the debugger: {GetStringForPSCommand(psCommand)}");
19441944

19451945
IEnumerable<TResult> output =
19461946
this.versionSpecificOperations.ExecuteCommandInDebugger<TResult>(

0 commit comments

Comments
 (0)