Language service fails to start with v2020.6.0
Issue Description
When either starting VSCode with Powershell extension v2020.6.0 with powershell file opened and focused or switching to a powershell file for a first time in a session or opening a new powershell file for a first time in a session, the following error message appears:
The terminal process "C:\Users\%username%\.dotnet\tools\pwsh.exe '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-Command', 'Import-Module 'c:\Users\%username%\.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\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====" -LogLevel 'Normal' -LogPath 'c:\Users\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1613299192-14aeee4a-081e-4e55-8bec-619b6925a90d1613299190940\EditorServices.log' -SessionDetailsPath 'c:\Users\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-17980-632073' -FeatureFlags @() '" terminated with exit code: 1.
New VSCode terminal (through Ctrl+Shift+`) starts normally. The issue is specific to v2020.6.0, everything works fine with v2020.4.0.
Attached Logs
14.02.2021 14:23:19 [NORMAL] - PowerShell executable: C:\Users\%username%\.dotnet\tools\pwsh.exe 14.02.2021 14:23:19 [NORMAL] - Language server starting -- 14.02.2021 14:23:19 [NORMAL] - PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\%username%\.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\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <===== " -LogLevel 'Diagnostic' -LogPath 'c:\Users\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1613301799-2b3205e7-cdb3-4cfe-a08a-1eb52bbde4081613301798523\EditorServices.log' -SessionDetailsPath 'c:\Users\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-17428-461536' -FeatureFlags @() 14.02.2021 14:23:19 [NORMAL] - pwsh.exe started. 14.02.2021 14:23:19 [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\%username%\.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\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <===== " -LogLevel 'Diagnostic' -LogPath 'c:\Users\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1613301799-2b3205e7-cdb3-4cfe-a08a-1eb52bbde4081613301798523\EditorServices.log' -SessionDetailsPath 'c:\Users\%username%\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-17428-461536' -FeatureFlags @() 14.02.2021 14:23:19 [NORMAL] - Waiting for session file 14.02.2021 14:27:20 [NORMAL] - Timed out waiting for session file to appear. 14.02.2021 14:27:20 [NORMAL] - Language server startup failed. 14.02.2021 14:27:20 [ERROR] - The language service could not be started: 14.02.2021 14:27:20 [ERROR] - Error: Timed out waiting for session file to appear.
Environment Information
Visual Studio Code
| Name | Version |
|---|---|
| Operating System | Windows_NT x64 10.0.19042 |
| VSCode | 1.53.2 |
| PowerShell Extension Version | 2020.6.0 |
PowerShell Information
PowerShell v7.1.2
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
| Extension | Author | Version |
|---|---|---|
| csharp | ms-dotnettools | 1.23.9 |
| jupyter | ms-toolsai | 2020.12.414227025 |
| MagicPython | magicstack | 1.1.0 |
| powershell | ms-vscode | 2020.6.0 |
| python | ms-python | 2021.1.502429796 |
| python | tht13 | 0.2.3 |
Thanks @AOmelaienko going to mark this as a duplicate of #3187 to consolidate the issues
This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.