vscode-powershell: The Language Service could not be started.

2018-6-11 11:31:48 [NORMAL] - Visual Studio Code v1.24.0 64-bit
2018-6-11 11:31:48 [NORMAL] - PowerShell Extension v1.7.0
2018-6-11 11:31:48 [NORMAL] - Operating System: Windows 64-bit
2018-6-11 11:31:48 [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
2018-6-11 11:31:48 [NORMAL] - Language server starting --
2018-6-11 11:31:48 [NORMAL] -     exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
2018-6-11 11:31:48 [NORMAL] -     args: C:\Users\rdattilo\.vscode\extensions\ms-vscode.powershell-1.7.0\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.7.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\rdattilo\.vscode\extensions\ms-vscode.powershell-1.7.0\modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'C:\Users\rdattilo\.vscode\extensions\ms-vscode.powershell-1.7.0\logs\1528731108-8debbaed-db66-4139-b259-39746061c6391528731105860\EditorServices.log' -SessionDetailsPath 'C:\Users\rdattilo\.vscode\extensions\ms-vscode.powershell-1.7.0\sessions\PSES-VSCode-17688-512792' -FeatureFlags @()
2018-6-11 11:31:49 [NORMAL] - powershell.exe started, pid: 19508
2018-6-11 11:32:48 [NORMAL] - Language server startup failed.
2018-6-11 11:32:48 [ERROR] - The language service could not be started: 
2018-6-11 11:32:48 [ERROR] - Timed out waiting for session file to appear.

This is all of the sudden started happening. It was fine a few days ago and then,this 😦

I’ve uninstalled VsCode, uninstalled the powershell add-in… several times.

Name                           Value
----                           -----
PSVersion                      5.1.17134.1
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.1
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1`

thats my PS version I’m running. The only thing of late that has changed on my PC is an update to Windows 1803. Although I was using VSCode just fine after the update. Maybe there is some sort of weird connection to this?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (4 by maintainers)

Most upvoted comments

I experienced the same symptoms after updating VS Code (1.25.1) and PowerShell extension (1.8.2). Discovered that C:\Users\USERNAME\.vscode\extensions\ms-vscode.powershell-1.8.2\modules\PowerShellEditorServices\Start-EditorServices.ps1 was failing to launch by looking at the logs and trying to launch it manually from a separate PowerShell instance with the same arguments. It returned the following prompt: Do you want to run software from this untrusted publisher? [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is “D”): indicating that the digital signature was not trusted.

To remedy this I performed the following:

  1. Browse to the file noted in the error message above. (ex. C:\Users\USERNAME\.vscode\extensions\ms-vscode.powershell-1.8.2\modules\PowerShellEditorServices\Start-EditorServices.ps1)
  2. Right click on the file and choose Properties | Digital Signatures
  3. Select the signature and click Details | View Certificate
  4. Choose the Details tab and click Copy to File…
  5. Save the file with a .CER extension.
  6. Using the Certificates MMC Snapin, import this file into the Trusted Publishers Certificate Store on the Local Machine.

@fatherofinvention I was having the same problem and imported the certificate just like you suggested and problem solved. 😄 I also noticed a Microsoft code signing certificate that expires 08/11/2018. I wonder if that has any bearing on the problem.