Skip to content

PowerShell 5.1 (x64) fails to start in VS Code 1.101.0 with PSES v3.0+ — no logs, EditorServicesHost.exe not launched #5215

Open
@mmunchandersen

Description

@mmunchandersen

System Info

  • VS Code version: 1.101.0 (64-bit, Stable)
  • PowerShell extension version: 2025.0.0 (also tried 2023.10.2 and Insiders)
  • PowerShell 5.1 version: 5.1.19041.5965 (x64)
  • OS: Windows 10 64-bit
  • PowerShell 7.5.1: works fine in VS Code

Problem Summary

PowerShell 5.1 (x64) fails to start in the PowerShell extension. The Integrated Console never appears. Logs show:
Image

2025-06-16 17:39:01.606 [info] Visual Studio Code: v1.101.0 64-bit on Windows 64-bit
2025-06-16 17:39:01.606 [info] PowerShell Extension: v2025.0.0
2025-06-16 17:39:01.606 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2025-06-16 17:39:02.105 [info] PowerShell process started with PID: 18672
2025-06-16 17:39:05.768 [info] Started PowerShell v7.5.1.
2025-06-16 17:39:06.935 [info] PowerShell is up-to-date.
2025-06-16 17:40:19.081 [info] Restarting session...
2025-06-16 17:40:19.136 [info] Starting 'PowerShell (x86)' at: C:\Program Files (x86)\PowerShell\7\pwsh.exe
2025-06-16 17:40:19.331 [info] PowerShell process started with PID: 28268
2025-06-16 17:40:22.033 [info] Started PowerShell v7.4.0.
2025-06-16 17:40:22.907 [info] Prompting to update PowerShell v7.4.0 to v7.5.1.
2025-06-16 17:40:38.762 [info] Restarting session...
2025-06-16 17:40:38.808 [info] Starting 'Windows PowerShell (x86)' at: C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\powershell.exe <<< this is where it hangs
2025-06-16 17:40:39.010 [info] PowerShell process started with PID: 23992
2025-06-16 17:42:04.695 [warning] Re-entered 'start' so waiting... <<< this is the debugger hanging after pressing F5

In an all new installation, with a dedicated PowerShell profile, this is the extension log
ms-vscode.powershell appears to load without error:

2025-06-16 17:38:32.840 [info] Extension host with pid 26888 started
2025-06-16 17:38:32.840 [info] Skipping acquiring lock for c:\Users\Morten\AppData\Roaming\Code\User\workspaceStorage\58eda7e5534856e8773a6577f6c9b333.
2025-06-16 17:38:32.877 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2025-06-16 17:38:32.902 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2025-06-16 17:38:32.912 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2025-06-16 17:38:32.967 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2025-06-16 17:38:33.018 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2025-06-16 17:38:33.311 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '', root cause: vscode.git
2025-06-16 17:38:33.316 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '
'
2025-06-16 17:38:33.357 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2025-06-16 17:38:33.458 [info] Eager extensions activated
2025-06-16 17:38:33.460 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:33.464 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:33.482 [info] ExtensionService#_doActivateExtension aaron-bond.better-comments, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:33.494 [info] ExtensionService#_doActivateExtension eamodio.gitlens, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:33.625 [info] ExtensionService#_doActivateExtension GitHub.copilot, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:35.223 [info] ExtensionService#_doActivateExtension GitHub.copilot-chat, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:35.563 [info] ExtensionService#_doActivateExtension usernamehw.errorlens, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:38:35.570 [info] ExtensionService#_doActivateExtension vscode-icons-team.vscode-icons, startup: false, activationEvent: 'onStartupFinished'
2025-06-16 17:39:01.450 [info] ExtensionService#_doActivateExtension ms-vscode.powershell, startup: false, activationEvent: 'onLanguage:powershell'
2025-06-16 17:39:55.455 [info] ExtensionService#_doActivateExtension vscode.debug-server-ready, startup: false, activationEvent: 'onDebugResolve'
2025-06-16 17:39:55.461 [info] ExtensionService#_doActivateExtension TylerLeonhardt.vscode-inline-values-powershell, startup: false, activationEvent: 'onDebugResolve:PowerShell'

c:\Users\Morten\AppData\Roaming\Code\logs\logs.zip:
logs.zip

[PSES] Server initialisation failed.
Message: Pending response rejected since the connection got disposed
Code: -32097
  • No EditorServices.log or other PSES logs are created
  • EditorServicesHost.exe does not launch (even manually)
  • Happens in a clean user profile with --user-data-dir, "editorServicesLogLevel": "Diagnostic", and no other extensions
  • PowerShell 5.1 launches fine manually ($PSVersionTable.PSVersion = 5.1.19041.5965)
  • Execution policy is RemoteSigned and profile is disabled/renamed
  • Cleaned all of:
    • %USERPROFILE%\.vscode\
    • %APPDATA%\Code\
    • %LOCALAPPDATA%\Code\
    • %USERPROFILE%\AppData\Roaming\Code*
  • Tried with multiple PowerShell extension versions and stable + insiders VS Code
  • Starting VSCode as an administrator does not help

Settings

{
  "powershell.powerShellAdditionalExePaths": {
    "PowerShell 5.1 (x64)": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
  },
  "powershell.powerShellDefaultVersion": "PowerShell 5.1 (x64)",
  "powershell.developer.editorServicesLogLevel": "Diagnostic"
}

(by default PS51 was attempted loaded using PowerShell at 'C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\powershell.exe' (which also failed, and which I can execute manually)


Steps to Reproduce

  1. Configure settings.json for 5.1 x64 as above
  2. Open a .ps1 file
  3. Observe no Integrated Console, no logs, no running EditorServices process

Expected Behavior

PowerShell 5.1 (x64) should launch and show the Integrated Console like PowerShell 7.x does.


Additional Info

This looks like a regression or crash in how PSES is hosted under .NET Framework when launched from VS Code. I’m happy to help trace further if needed.

I can run scripts in both 5.1 and 7.5 using Product:
PowerShell Studio 2025 (64 Bit)
Build: v5.9.256
OS: Windows 10.0.19045
PS Version(s): 5.1.19041.1, 7.5.1, 7.4.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions