Skip to content

Get session menu doesn't show what we defined in powershell.powerShellAdditionalExePaths #3978

Closed
@frankchen76

Description

@frankchen76

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 am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

for recent update, I no longer see what I defined in powershell.powerShellAdditionalExePaths showed up from session menu. the below is what settings I have

    "powershell.powerShellDefaultVersion": "PowerShell 5.1",
    "powershell.powerShellAdditionalExePaths":[
        {
            "exePath": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "versionName": "PowerShell 5.1"
        },
        {
            "exePath": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
            "versionName": "PowerShell 7"
        }
    ]

I don't see those options are displayed at session menu below:
image

when I checked my settings, I also see the below yellow line to indicate the error which I've never seen before
image

any ideas how to correct that?

PowerShell Version

PS C:\AzureDevOps\PFEProjects-Private\PS-Samples> $psversiontable

Name                           Value
----                           -----
PSVersion                      7.2.3
PSEdition                      Core
GitCommitId                    7.2.3
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

C:\AzureDevOps\PFEProjects-Private\PS-Samples>code --version
1.67.1
da15b6fd3ef856477bf6f4fb29ba1b7af717770d
x64

Extension Version

C:\AzureDevOps\PFEProjects-Private\PS-Samples>code --list-extensions --show-versions powershell                 
alefragnani.Bookmarks@13.3.0
ms-azuretools.vscode-azurefunctions@1.6.2
ms-azuretools.vscode-azureresourcegroups@0.4.0
ms-azuretools.vscode-azurestorage@0.13.0
ms-dotnettools.csharp@1.24.4
ms-vscode.azure-account@0.10.1
ms-vscode.powershell@2022.5.1
ms-vscode.vs-keybindings@0.2.1
msjsdiag.debugger-for-chrome@4.13.0
msjsdiag.debugger-for-edge@1.0.15
msoffice.microsoft-office-add-in-debugger@0.3.0
pnp.polacode@0.3.4
quicktype.quicktype@12.0.46
TeamsDevApp.ms-teams-vscode-extension@3.8.0
yzhang.markdown-all-in-one@3.4.3

Steps to Reproduce

include the below JSON into settings

    "powershell.powerShellAdditionalExePaths":[
        {
            "exePath": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "versionName": "PowerShell 5.1"
        },
        {
            "exePath": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
            "versionName": "PowerShell 7"
        }
    ]

click "Command palette" -> "PowerShell:Show Session menu", I should be able to see above options.

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions