File tree 1 file changed +9
-1
lines changed
src/PowerShellEditorServices/Services/PowerShell/Host
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.
2
2
// Licensed under the MIT License.
3
3
4
4
using System ;
@@ -601,6 +601,14 @@ private void DoOneRepl(CancellationToken cancellationToken)
601
601
return ;
602
602
}
603
603
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
+
604
612
// When a task must run in the foreground, we cancel out of the idle loop and return to the top level.
605
613
// At that point, we would normally run a REPL, but we need to immediately execute the task.
606
614
// So we set _skipNextPrompt to do that.
You can’t perform that action at this time.
0 commit comments