From b92d7217947c5502fdd9bc4c10b0f00c5add76be Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Sun, 1 May 2022 11:04:25 -0400 Subject: [PATCH] Do not exit from DebuggerStop unless resuming --- .../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; + } } }