-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
Issue-BugA bug to squash.A bug to squash.Needs: Author FeedbackPlease give us the requested feedback!Please give us the requested feedback!
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed 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
When a variable captures output, that is being piped through the Out-GridView command, the VSCode PowerShell extension is unable to auto-complete the property names from that variable.
The declared [OutputType()] seems to get "lost" from the Get-AzStorageAccount command, when it's piped through Out-GridView. Is there a way to preserve this?
PowerShell Version
Name Value
---- -----
PSVersion 7.4.5
PSEdition Core
GitCommitId 7.4.5
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Name : Visual Studio Code Host
Version : 2024.2.2
InstanceId : 652c5855-aad9-4300-a9bd-6f429676af8d
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspaceVisual Studio Code Version
1.93.1
38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
x64Extension Version
ms-vscode.powershell@2024.2.2Steps to Reproduce
- Use code block below
- Try to auto-complete the property name on line 2 (CTRL + SPACE after period)
- It fails
- Remove the pipe to
Out-GridView - Try auto-completing the property name on line 2 again
- It works
- See video reproduction below
$SelectedStorageAccount = Get-AzStorageAccount | Out-GridView -Title 'Select an Azure Storage Account' -OutputMode Single
$SelectedStorageAccount.ResourceGroupNameVisuals
2024-10-02.10-50-10.mp4
Logs
No response
Metadata
Metadata
Assignees
Labels
Issue-BugA bug to squash.A bug to squash.Needs: Author FeedbackPlease give us the requested feedback!Please give us the requested feedback!