PowerShell / PowerShell/vscode-powershell
Execution policy should be checked client side before starting PowerShell Editor Services to prevent cryptic start issues
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Hello everyone,
I don't manage to execute the Console Preview, still the message "Unable to instantiate; language client undefined".
Even though I tried to see past issued, I coudn't manage to solve :(
If I install PowerShell 7.0 works correctly, but I will need to use 5.1 ones for project reasons.
ISE 5.1 is working fine, but.. VS code is another story!
Everything with latest version I'm afraid...
Here is what I get:
8/26/2020 12:16:16 PM [NORMAL] - Visual Studio Code v1.48.2 64-bit
8/26/2020 12:16:16 PM [NORMAL] - PowerShell Extension v2020.6.0
8/26/2020 12:16:16 PM [NORMAL] - Operating System: Windows 64-bit
8/26/2020 12:16:16 PM [NORMAL] - Language server starting --
8/26/2020 12:16:16 PM [NORMAL] - PowerShell executable: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
8/26/2020 12:16:16 PM [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1598436976-ca22623e-8ae9-41d3-bea4-4d671b2ec2bb1598436975595\EditorServices.log' -SessionDetailsPath 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-12824-615781' -FeatureFlags @()
8/26/2020 12:16:16 PM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1598436976-ca22623e-8ae9-41d3-bea4-4d671b2ec2bb1598436975595\EditorServices.log' -SessionDetailsPath 'c:\Users\en32071\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-12824-615781' -FeatureFlags @()
8/26/2020 12:16:16 PM [NORMAL] - powershell.exe started.
8/26/2020 12:16:16 PM [NORMAL] - Waiting for session file
8/26/2020 12:16:18 PM [NORMAL] - Session file found
8/26/2020 12:16:18 PM [NORMAL] - Registering terminal close callback
8/26/2020 12:16:18 PM [NORMAL] - Registering terminal PID log callback
8/26/2020 12:16:18 PM [NORMAL] - powershell.exe PID: 17780
8/26/2020 12:16:18 PM [NORMAL] - Language server started.
8/26/2020 12:16:18 PM [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\\\.\\pipe\\PSES_tsmmuob5.tc3","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_og2bai0c.qkl"}
8/26/2020 12:16:18 PM [NORMAL] - Connecting to language service on pipe \\.\pipe\PSES_tsmmuob5.tc3...
8/26/2020 12:16:18 PM [NORMAL] - Language service connected.
8/26/2020 12:17:20 PM [ERROR] - <ConsoleFeature>: Unable to instantiate; language client undefined.
Any idea?!
Thank you!
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
Reproduce the startup failure with Windows PowerShell 5.1 and review the VS Code extension startup path that launches PowerShell Editor Services. The change is complete when an incompatible execution policy is detected client side before launch and the user receives a clear diagnostic instead of the cryptic language-client error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100