From e7efb40cd5cbb69941b40b78eda169d81f8d8bfd Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Mon, 2 May 2022 10:16:01 -0700 Subject: [PATCH] Do not exit from `DebuggerStop` unless resuming (#1784) --- .../Services/PowerShell/Host/PsesInternalHost.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs b/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs index a5b0b3683..1d9813a48 100644 --- a/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs +++ b/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs @@ -702,7 +702,10 @@ private void RunExecutionLoop(bool isForDebug = false) PopPowerShell(RunspaceChangeAction.Exit); } - return; + if (ShouldExitExecutionLoop) + { + return; + } } }