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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mmunchandersen opened this issue Jun 16, 2025 · 5 comments

Comments

@mmunchandersen
Copy link

mmunchandersen commented Jun 16, 2025

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

@EdCallahan
Copy link

I haven't dug into it as deeply as @mmunchandersen, but I am having the same issue. Powershell extension is just not starting, unable to run powershell 5 scripts. I'm on Win11 but otherwise same platform.

I am in a corporate environment with UAC rights controlled by Admin By Request, which may not be relevant. But I find if I start vscode with Administrator rights, the extension starts and I can work as normal.

@jppar1
Copy link

jppar1 commented Jun 16, 2025

Same problem here, enable to start Powershell Extension terminal on Powershell 5.
I rolled back to version 1.100.3 of vscode and everything is working.

@mmunchandersen
Copy link
Author

mmunchandersen commented Jun 16, 2025

Thanks @jppar1 for pointing out the obvious solution. I, too, rolled back to 1.100.3, (https://code.visualstudio.com/updates/v1_100) and now I can again switch between 5.1 and 7.5

( I also disabled vscode auto update: "update.mode": "manual" )

Consequences:
GitHub Copilot Chat: Extension is not compatible with Code 1.100.3. Extension requires: ^1.101.0-20250523. This extension is using the API proposal 'languageModelDataPart' that is not compatible with the current version of VS Code.

@andyleejordan
Copy link
Member

This looks similar to this upstream bug: microsoft/vscode#251446 something that seems to have broken between VS code versions which points us to the shell integration script but we don't know what the problem is yet. For now, can you try the version of VS code that was broken, but with shell integration explicitly disabled? That would help us confirm the first part of the theory. /cc @Tyriar

@scriptingstudio
Copy link

Try to comment setting powershell.powerShellDefaultVersion. It worked for me on several computers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants