Skip to content

When the built-in $null was watched its value was incorrect #4816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 tasks done
thegraffix opened this issue Nov 4, 2023 · 1 comment · Fixed by PowerShell/PowerShellEditorServices#2097
Closed
6 tasks done
Assignees
Labels

Comments

@thegraffix
Copy link

thegraffix commented Nov 4, 2023

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

The debugging WATCH pane shows $null: ""

image



  • The way $null is represented makes it difficult to distinguish between an empty string value $MyStringVar = "" vs an uninitialzed variable $VarThatDoesNotExist.
  • I'm not certain if this is VSCode or the PowerShell extension

PowerShell Version

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.9
PSEdition                      Core
GitCommitId                    7.3.9
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.10032.0, 6.0.0, 6.1.0, 6.2.0, 7.0.0, 7.1.0, 7.2.0, 7.3.9}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

PS C:\> code --version
1.84.0
d037ac076cee195194f93ce6fe2bdfe2969cc82d
x64

Extension Version

PS C:\> code --list-extensions --show-versions | Select-String powershell

[email protected]

Steps to Reproduce

Add $null to the debugging WATCH list.

Visuals

No response

Logs

No response

@thegraffix thegraffix added the Issue-Bug A bug to squash. label Nov 4, 2023
@SydneyhSmith
Copy link
Collaborator

Thanks @thegraffix for the bug report

@SydneyhSmith SydneyhSmith moved this to Wishlist in Flying Fox Nov 8, 2023
@andyleejordan andyleejordan moved this from Wishlist to In Progress in Flying Fox Nov 10, 2023
@andyleejordan andyleejordan self-assigned this Nov 10, 2023
@andyleejordan andyleejordan changed the title WATCH debugging pane represents $null as an empty string "" When the built-in $null was watched its value was incorrect Nov 10, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Flying Fox Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants