Switching to PowerShel 5.1 in Visual Studio Code

In previsou versions of VS Code, there used to be button for switching PS version, but for whatever reason, they removed it. In order to switch PS Version in current version of VS Code, you need to press CTRL+SHIFT+P, then type in session menu and select PowerShell: Show Session Menu.

file

In next dialog select your desired PowerShell version, e.g. Sindows Powershell (x64).

file

That’s it, now you can debug your PowerShell scripts using older PS versions.

Last modified: November 16, 2023
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments