question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Powershell extension won't start

See original GitHub issue

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 have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

Running the extension, also in a new computer with a fresh install with latest compontens, i obtain this error:

The terminal process “C:\Program Files\PowerShell\6\pwsh.exe ‘-NoProfile’, ‘-NonInteractive’, ‘-ExecutionPolicy’, ‘Bypass’, ‘-Command’, 'Import-Module ‘c:\Users\user.vscode\extensions\ms-vscode.powershell-2021.8.2\modules\PowerShellEditorServices\PowerShellEditorServices.psd1’; Start-EditorServices -HostName ‘Visual Studio Code Host’ -HostProfileId ‘Microsoft.VSCode’ -HostVersion ‘2021.8.2’ -AdditionalModules @(‘PowerShellEditorServices.VSCode’) -BundledModulesPath ‘c:\Users\user.vscode\extensions\ms-vscode.powershell-2021.8.2\modules’ -EnableConsoleRepl -StartupBanner '=====> PowerShell Integrated Console v2021.8.2 <===== ’ -LogLevel ‘Normal’ -LogPath ‘c:\Users\user.vscode\extensions\ms-vscode.powershell-2021.8.2\logs\1629890092-e9128c08-26bb-4a7a-8b04-ec955914db821629890016515\EditorServices.log’ -SessionDetailsPath ‘c:\Users\user.vscode\extensions\ms-vscode.powershell-2021.8.2\sessions\PSES-VSCode-29028-233472’ -FeatureFlags @() '” terminated with exit code: 1.

PowerShell Version

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

Visual Studio Code Version

1.59.1

Extension Version

Fresh install.

Steps to Reproduce

Fresh install of code, and extension and running the extension.

Visuals

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
andschwacommented, Aug 26, 2021

Hi, while you stated you’re using PowerShell 5.1 in your bug report, it seems you are trying to launch PowerShell 6 for the extension (see: C:\Program Files\PowerShell\6\pwsh.exe in your logs) which is not supported. Please either try PowerShell 7 or 5.1. You can run the command “Show Session Menu” to choose among the discovered PowerShell versions.

I would also advise removing PowerShell 6 entirely, as it is out of support in general (6.2 end-of-life was September 2020), and install PowerShell 7+ in its place.

0reactions
msftbot[bot]commented, Sep 7, 2021

This issue has been marked as answered and has not had any activity in a day. It has been automatically closed for housekeeping purposes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerShell won't start in VSCode · Issue #2849 - GitHub
For some reason I can't use PowerShell inside vscode anymore. It just says "Loading the PowerShell extension is taking longer than expected" ...
Read more >
Visual Studio Code Powershell startup failure - Stack Overflow
Right click on the PowerShell extension and select "Install Another Version..." Pick version "2020.1.0". It also suggests disabling auto ...
Read more >
Resolved PowerShell Visual studio code stuck with 'Starting ...
After installing Microsoft PowerShell extension on VSCode when executing PowerShell ps1 script, it was getting stuck/freeze/hang with ...
Read more >
VS Code Powershell Extension won't complete loading - Reddit
Today I need help figuring out how to get the Powershell Extension to complete loading. On the computer I use the most, opening...
Read more >
PowerShell Extension for Visual Studio Code August 2022 ...
The extension uses this library to start, connect, and communicate with the LSP server, PowerShell Editor Services. By incorporating this update ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found