Skip to content

Commit 15a9afa

Browse files
also check for tempSession (#1207)
1 parent cb9898a commit 15a9afa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PowerShellEditorServices/Server/PsesDebugServer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public async Task StartAsync()
7676
_powerShellContextService.IsDebugServerActive = true;
7777

7878
// Needed to make sure PSReadLine's static properties are initialized in the pipeline thread.
79-
if (_usePSReadLine && Interlocked.Exchange(ref s_hasRunPsrlStaticCtor, 1) == 0)
79+
// This is only needed for Temp sessions who only have a debug server.
80+
if (_usePSReadLine && _useTempSession && Interlocked.Exchange(ref s_hasRunPsrlStaticCtor, 1) == 0)
8081
{
8182
// This must be run synchronously to ensure debugging works
8283
_powerShellContextService

0 commit comments

Comments
 (0)