-
Notifications
You must be signed in to change notification settings - Fork 514
Extension should notify user when Constrained or Restricted language mode is enabled #291
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
Comments
Hi @z442a9, it appears that your machine must have some policy set which enabled ConstrainedLanguage mode. This is preventing the language service from loading successfully. Open a normal PowerShell prompt and run this line and let me know if the output is $ExecutionContext.SessionState.LanguageMode You may have to talk to your administrator to see if this can be turned off for the PowerShell extension to work correctly. I'll add a warning message in the UI to notify the user that the extension won't work when this mode is turned on. |
Hi When I run the command the output is: ConstrainedLanguage |
Hello, |
Because we're not a native app (like the ISE), but instead a client/server, with the server being a PowerShell process running a module that hosts PowerShell execution, I suspect trying to implement this we'd have widespread problems with things like the whitelisted types (i.e. EditorServices is just an ordinary PowerShell module which uses non-whitelisted types for everything from just starting the host to creating the message transport channel, so getting it to start in ConstrainedLanguage mode would be a significant work item). I'll see if I can do some investigating on the feasibility of this. |
Closing this in favor of #754 |
Uh oh!
There was an error while loading. Please reload this page.
Please fill in these details so that we can help you!
System Details
$PSVersionTable
:Issue Description
Everytime when I open any PS script with VS Code and PS extension installed I get these errors:
Error: Could not start language service: undefined
Error: Couldn't start client PowerShell Editor Services
1473484659-PowerShell.zip
Attached Logs
Follow the instructions in the README
about capturing and sending logs.
The text was updated successfully, but these errors were encountered: