You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sure this issue is with PowerShell Editor Services itself and does not reproduce in a standalone PowerShell instance, and is not an issue with my editor.
I have verified that I am using the latest version of PowerShell Editor Services.
I am using the Helix editor (https://github.com/helix-editor/helix).
If I download the v3.10.0 release zip and extract it in C:\tools with the following config, then it works as expected. Meaning I get code analysis and suggestions within the editor. If I try the same thing with v3.11.0 or anything later including the latest v4.2.0, then it does not work. Meaning there is no code analysis or suggestions displaying within the editor. Please let me know what other information I can provide to help.
I looked through v3.10.0...v3.11.0 and couldn't spot anything that would affect the startup of the server, so my best guess is currently a machine issue, specifically around trusting the module (see PowerShell Signing. Specifically here in your logs:
2025-01-26 10:10:26.020 -06:00 [VRB] Setting execution policy to "RemoteSigned"
2025-01-26 10:10:32.918 -06:00 [VRB] Could not write to output handler, perhaps serialization failed?
That's where at startup the server attempts to set the execution policy appropriately such that the included bundled modules can be imported. Can you set your execution policy to "Bypass" when starting the PowerShell process? That would mean adding to args like this:
Running Set-ExecutionPolicy Bypass in the PowerShell session before starting Helix did work.
Setting it back to "RemoteSigned" and updating the config like args = ["-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", ...] did not work.
Running Get-ChildItem C:\tools\PowerShellEditorServices\ -Recurse | Unblock-File did work.
Just Unblocking the directory I want to trust seems like the best solution to me. I will add this to the documentation on Helix's wiki https://github.com/helix-editor/helix/wiki/Language-Server-Configurations#powershell
Thank you for your help!
Prerequisites
Summary
I am using the Helix editor (https://github.com/helix-editor/helix).
If I download the v3.10.0 release zip and extract it in C:\tools with the following config, then it works as expected. Meaning I get code analysis and suggestions within the editor. If I try the same thing with v3.11.0 or anything later including the latest v4.2.0, then it does not work. Meaning there is no code analysis or suggestions displaying within the editor. Please let me know what other information I can provide to help.
My languages.toml looks like this for powershell.
PowerShell Version
Editor Version
PowerShell Editor Services Version
Not familiar with using this service interactively.
Steps to Reproduce
Visuals
No response
Logs
I set the log level to Diagnostic.
StartEditorServices.log
PowerShellEditorServices.log
The text was updated successfully, but these errors were encountered: