File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/PowerShellEditorServices/Services/PowerShell/Host Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- // Copyright (c) Microsoft Corporation.
1+ // Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
44using System ;
@@ -601,6 +601,14 @@ private void DoOneRepl(CancellationToken cancellationToken)
601601 return ;
602602 }
603603
604+ // If we started the debug server, then on each REPL we need to check if we're still
605+ // actively debugging, and if not, stop the server.
606+ if ( DebugContext . OwnsDebugServerState && ! CurrentRunspace . Runspace . Debugger . InBreakpoint )
607+ {
608+ DebugContext . OwnsDebugServerState = false ;
609+ _languageServer ? . SendNotification ( "powerShell/stopDebugger" ) ;
610+ }
611+
604612 // When a task must run in the foreground, we cancel out of the idle loop and return to the top level.
605613 // At that point, we would normally run a REPL, but we need to immediately execute the task.
606614 // So we set _skipNextPrompt to do that.
You can’t perform that action at this time.
0 commit comments