Skip to content

PowerShell won't start in VSCode #2849

@devedse

Description

@devedse

Issue Type: Bug

For some reason I can't use PowerShell inside vscode anymore. It just says "Loading the PowerShell extension is taking longer than expected". I've tried to reinstall the PowerShell extension and also VSCode. But none of these steps fixed it.

The issue happens whenever I open VSCode and try to do anything with a PowerShell file. (E.g. run it)

Anyway, when I first start VSCode this error shows up:

The terminal process "C:\Users\devedse\.dotnet\tools\pwsh.exe '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-Command', 'Import-Module 'c:\Users\devedse\.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\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1595937929-6615e5c2-13e0-4ed4-855a-50639ff76d871595937927968\EditorServices.log' -SessionDetailsPath 'c:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-21592-527545' -FeatureFlags @() '" terminated with exit code: 1.

Here's the files mentioned in C:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1593015143-28af1fd9-3db7-4b8f-b7e9-83453c652a221593015141446\

EditorServices.log:

2020-06-24 18:12:27.026 +02:00 [INF] PowerShell runtime version: 5.1.18362.752, edition: Desktop
2020-06-24 18:12:27.831 +02:00 [INF] highlight handler loaded

StartEditorServices.log: (It's empty)


vscode-powershell.log:

24/06/2020 18:12:23 [NORMAL] - Language server starting --
24/06/2020 18:12:23 [NORMAL] -     PowerShell args: -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\devedse\.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\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1593015143-28af1fd9-3db7-4b8f-b7e9-83453c652a221593015141446\EditorServices.log' -SessionDetailsPath 'c:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-18556-120503' -FeatureFlags @() 
24/06/2020 18:12:23 [NORMAL] -     PowerShell executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
24/06/2020 18:12:23 [NORMAL] -     PowerShell Editor Services args: Import-Module 'c:\Users\devedse\.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\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <=====
" -LogLevel 'Normal' -LogPath 'c:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1593015143-28af1fd9-3db7-4b8f-b7e9-83453c652a221593015141446\EditorServices.log' -SessionDetailsPath 'c:\Users\devedse\.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-18556-120503' -FeatureFlags @() 
24/06/2020 18:12:23 [NORMAL] - powershell.exe started.
24/06/2020 18:12:23 [NORMAL] - Waiting for session file
24/06/2020 18:12:25 [NORMAL] - Session file found
24/06/2020 18:12:25 [NORMAL] - Registering terminal close callback
24/06/2020 18:12:25 [NORMAL] - Registering terminal PID log callback
24/06/2020 18:12:25 [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\\\.\\pipe\\PSES_bw0u3xdz.c3c","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_k3plnz52.ng3"}
24/06/2020 18:12:25 [NORMAL] - Connecting to language service on pipe \\.\pipe\PSES_bw0u3xdz.c3c...
24/06/2020 18:12:25 [NORMAL] - Language service connected.
24/06/2020 18:12:25 [NORMAL] - Language server started.
24/06/2020 18:12:25 [NORMAL] - powershell.exe PID: 24456
24/06/2020 18:13:32 [NORMAL] - powershell.exe terminated or terminal UI was closed

I looked at similar issues too, but found no resolution:
#1673

VS Code version: Code 1.47.2 (17299e413d5590b14ab0340ea477cdd86ff13daf, 2020-07-15T18:22:06.216Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.90GB (18.01GB free)
Process Argv C:\XGit\TestRepo
Screen Reader no
VM 0%
Extensions (12)
Extension Author (truncated) Version
azure-blockchain AzB 1.5.0
terraform has 2.1.1
solidity Jua 0.0.74
vscode-azureterraform ms- 0.3.1
vscode-cosmosdb ms- 0.14.0
vscode-docker ms- 1.4.1
python ms- 2020.7.96456
remote-wsl ms- 0.44.4
azure-account ms- 0.8.11
powershell ms- 2020.6.0
vsliveshare ms- 1.0.2478
vetur oct 0.25.0

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