PowerShell / PowerShell/vscode-powershell
Format on save hangs with PowerShell v7.5.0, runs fine with v7.4.7
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
Format on save hangs with PowerShell v7.5.0, it never completes. Works fine with PowerShell v7.4.7.
I've tried with v7.5.0 managed by mise (ref: https://github.com/PowerShell/vscode-powershell/issues/5123#issuecomment-2612568256), and downloaded and unzipped v7.5.0 ZIP myself.
- Windows 11 x64 24H2
- VSCode v1.96.4
- vscode-powershell v2025.0.0
- Also tried with preview version v2025.1.0
PowerShell Version
v7.5.0 x64 Windows
Name : Visual Studio Code Host
Version : 2025.1.0
InstanceId : dd17a949-7d42-4f49-b509-b842f6923341
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : nb-NO
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.96.4
cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
x64
Extension Version
ms-vscode.powershell@2025.0.0
Steps to Reproduce
- Use PowerShell v7.5.0
- Configure format on save for PowerShell in VSCode
- Open PS1 file, do changes, CTRL + S to save
- VSCode hangs, formatting never happens
Visuals
Logs
I've added following config:
{
"powershell editor services.trace.server": "Verbose",
"powershell.developer.editorServicesLogLevel": "Trace"
}
I see no relevant log events.
- Is
"powershell editor services.trace.server"relevant anymore?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing format on save with PowerShell v7.5.0 and compare it with v7.4.7 using the listed VS Code and extension versions. Review the extension's trace and editor-services logs while saving a PS1 file; done means formatting completes instead of leaving VS Code hung, with the regression covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100