VS Code PowerShell Extension Fails to Load: Continuous Spinning Indicator and Console Prompt Absence #5001
Closed
6 tasks done
Labels
Area-Startup
Issue-Bug
A bug to squash.
Needs: Author Feedback
Please give us the requested feedback!
Prerequisites
Summary
The order of the PS module paths on Windows seems to influence the loading behavior of the PowerShell extension in VS Code. If Windows PowerShell module paths are placed on top of the PowerShell 7 module paths, it results in a continuous spinning indicator and the PowerShell terminal never reaching a prompt.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Steps to Set Up PowerShell 7 in VSCode on Windows 11
Install PowerShell 7:
Download the installer for PowerShell 7 from the official GitHub repository.
Run the installer and follow the on-screen instructions to complete the installation.
Install Visual Studio Code (VSCode):
Download VSCode from the official Visual Studio Code website.
Run the installer and follow the on-screen instructions to install VSCode.
Install the PowerShell Extension for VSCode:
Open VSCode.
Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or pressing Ctrl+Shift+X.
In the Extensions view, search for "PowerShell".
Click on the PowerShell extension and then click Install.
Change System Variable PSModulePath:
Open the Start Menu and search for "Environment Variables".
Select "Edit the system environment variables".
In the System Properties window, click the Environment Variables button.
In the Environment Variables window, find and select the PSModulePath variable under System variables, then click Edit.
Ensure that the PSModulePath includes both the paths for PowerShell 7 and Windows PowerShell. It should look something like:
**C:\Windows\System32\WindowsPowerShell\v1.0\Modules**;C:\Program Files\PowerShell\7\Modules;...
Make sure the path for Windows PowerShell modules is placed on top to reproduce the issue.
Open VSCode.
Open or create a new PowerShell script file (.ps1).
Run the script by pressing F5 or by right-clicking the script file and selecting Run from the context menu.
You should see that the prompt does not appear and the continuous Spinning Indicator
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: