-
Notifications
You must be signed in to change notification settings - Fork 503
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
Format on save hangs with PowerShell v7.5.0, runs fine with v7.4.7 #5134
Comments
I can't reproduce on my work computer, so I don't know what is going on here. If I find out where to get relevant logs I'll add more info. |
Thanks as alwyas @o-l-a-v, let me know if it crops up again. |
@o-l-a-v to answer your question, the first line is no longer relevant, but powershell.trace.server is, it's configurable in the options menu now, it's not a "hidden" setting, and the logging is much better in the latest version of the extension. |
Thanks @JustinGrote. I set that to verbose, I guess the output is added to output tab -> PowerShell: Trace LSP? It does not log anything when this issue is reproduced, and all it logs before it is: 2025-02-04 20:51:23.642 [info] No parameters provided.
2025-02-04 20:51:28.275 [info] No result returned. Maybe this is a VSCode problem, or some other extension interfering. Edit 1: Created a new temporary VSCode profile. Added PowerShell and EditorConfig extension only, with {
"editor.formatOnSave": true,
"powershell.developer.editorServicesLogLevel": "Trace",
"powershell.powerShellAdditionalExePaths": {
"7.5": "Z:\\Programs\\PowerShell\\7.5\\pwsh.exe"
},
"powershell.powerShellDefaultVersion": "7.5",
"powershell.trace.server": "verbose"
} And it worked. I'll nuke my default profile I guess. Edit 2: Testing my default profile with just the config above: It worked. Must be some conflicting setting. |
The new logging has different log levels that unify with VScode. You need to set your log level to debug or trace in vscode for the ps extension (or globally). I'm actually having a hard time finding a doc on this, guess I should contribute one to the vscode docs repo. |
I ended up uninstalling VSCode, deleted |
Prerequisites
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: #5123 (comment)), and downloaded and unzipped v7.5.0 ZIP myself.
PowerShell Version
v7.5.0 x64 Windows
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
Visuals
Logs
I've added following config:
I see no relevant log events.
"powershell editor services.trace.server"
relevant anymore?The text was updated successfully, but these errors were encountered: