VsCode hangs/freezes with "Starting up powershell" in status bar

Viewed 1317

Sometimes starting up VsCode to debug a file, the PowerShell extension hangs and the VsCode terminal Window has a status bar message Starting PowerShell. It never times out and it never crashes, it just stays stuck at Starting PowerShell:

There's going to be various answers to this question.. let me start with two solution that have worked for me.
1 Answers

Make sure all other Powershell windows are closed.

Confirm that all Powershell processes are terminated in the relevant OS, eg Task Manager in windows.

Start VsCode running as Admin.


If you get prompted to update the Package Manager do so:

powershell.exe -NoLogo -NoProfile -Command 'Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.6 -Scope CurrentUser -AllowClobber'


If that fails, in the Terminal run a Powershell command, eg

Get-PSRepository

That will complete the "Starting Powerhell" and in the status bar you will see the Powershell version.

Related