- Notifications
You must be signed in to change notification settings - Fork 240
Open
Labels
Issue-BugA bug to squash.A bug to squash.Needs: TriageMaintainer attention needed!Maintainer attention needed!
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 PowerShell Editor Services itself and does not reproduce in a standalone PowerShell instance, and is not an issue with my editor.
- I have verified that I am using the latest version of PowerShell Editor Services.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
Setting nested field value throwsUnable to cast object of type 'Microsoft.PowerShell.EditorServices.Services.DebugAdapter.VariableDetails' to type 'Microsoft.PowerShell.EditorServices.Services.DebugAdapter.VariableContainerDetails'.
The code below should be causing the problem.
PowerShellEditorServices/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs
Line 390 in 41fce39
| VariableContainerDetailsvariableContainer=(VariableContainerDetails)variables[variableContainerReferenceId]; |
PowerShell Version
Name Value---- -----PSVersion 7.4.3PSEdition CoreGitCommitId 7.4.3OS Microsoft Windows 10.0.19045Platform Win32NTPSCompatibleVersions{1.0, 2.0, 3.0, 4.0…}PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1WSManStackVersion 3.0Editor Version
Visual Studio CodeVersion: 1.91.1 (user setup)Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729Date: 2024-07-09T22:06:49.809ZElectron: 29.4.0ElectronBuildId: 9728852Chromium: 122.0.6261.156Node.js: 20.9.0V8: 12.2.281.27-electron.0OS: Windows_NT x64 10.0.19045PowerShell Editor Services Version
Major Minor Build Revision----- ----- ----- --------3 20 1 0Steps to Reproduce
$val = [PSCustomObject]@{NestedField = "Test" } Write-Host $val while ($true){Write-Host $val } - Put breakpoint on line 4 (
Write-Host $val) - Start debugging
- Open "Local" scope in Variables tab
- Find $val and change NestedField value
Visuals
No response
Logs
No response
ForNeVeR
Metadata
Metadata
Assignees
Labels
Issue-BugA bug to squash.A bug to squash.Needs: TriageMaintainer attention needed!Maintainer attention needed!
