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:
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:
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.