Skip to content

Visual Studio Code. Powershell Extension failed to load #4028

@PaulChen507

Description

@PaulChen507

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

Powershell extension failed to load.

PowerShell Version

$PSVersionTable

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

Visual Studio Code Version

Version: 1.68.1 (system setup)
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630
Date: 2022-06-14T12:48:58.283Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Windows_NT x64 10.0.17763

Extension Version

v2022.5.1

Steps to Reproduce

$credenciales = Get-Credential
$fecha = get-date -UFormat "%y%m%d"
Clear-Host
foreach ($server in $servers)
{
Write-Host "Buscando parches en...$server" -ForegroundColor Green
Get-HotFix -ComputerName $server -Credential $credenciales |
Select-Object PSComputername, HotfixID, Description, Installedon, InstalledBy |
Sort-Object -Property InstalledOn -Descending |
Export-Csv c:\powershell\output"$server$fecha.csv" -NoTypeInformation
}

Visuals

No response

Logs

6/16/2022 10:51:05 AM [NORMAL] - Visual Studio Code v1.68.1 64-bit
6/16/2022 10:51:05 AM [NORMAL] - PowerShell Extension v2022.5.1
6/16/2022 10:51:05 AM [NORMAL] - Operating System: Windows 64-bit
6/16/2022 10:51:05 AM [NORMAL] -
WARNING: In development mode but PowerShellEditorServices dev module path cannot be found (or has not been built yet): c:\Users\paulchen.vscode\extensions\PowerShellEditorServices\module

6/16/2022 10:51:05 AM [NORMAL] - Language server starting --
6/16/2022 10:51:05 AM [NORMAL] - PowerShell executable: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
6/16/2022 10:51:05 AM [NORMAL] - PowerShell args: -NoProfile -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2022.5.1' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2022.5.1 <=====
' -LogLevel 'Normal' -LogPath 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\logs\1655394665-c3d09e5a-eaf6-4d82-a016-618758f71aab1655394663850\EditorServices.log' -SessionDetailsPath 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\sessions\PSES-VSCode-16896-984588' -FeatureFlags @()
6/16/2022 10:51:05 AM [NORMAL] - PowerShell Editor Services args: Import-Module 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2022.5.1' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\modules' -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2022.5.1 <=====
' -LogLevel 'Normal' -LogPath 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\logs\1655394665-c3d09e5a-eaf6-4d82-a016-618758f71aab1655394663850\EditorServices.log' -SessionDetailsPath 'c:\Users\paulchen.vscode\extensions\ms-vscode.powershell-2022.5.1\sessions\PSES-VSCode-16896-984588' -FeatureFlags @()
6/16/2022 10:51:05 AM [NORMAL] - powershell.exe started.
6/16/2022 10:51:05 AM [NORMAL] - Waiting for session file
6/16/2022 10:55:05 AM [NORMAL] - Timed out waiting for session file to appear.
6/16/2022 10:55:05 AM [NORMAL] - Language server startup failed.
6/16/2022 10:55:05 AM [ERROR] - The language service could not be started:
6/16/2022 10:55:05 AM [ERROR] - Error: Timed out waiting for session file to appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions