Debug watched array item is shown as an empty string
See original GitHub issueFully described here: https://github.com/Microsoft/vscode/issues/72433
Debugging PowerShell: an array value is shown as an empty string on the left but it’s plainly not empty on hover or under locals:
System Details
VSCode version:
1.33.1 51b0b28134d51361cf996d2f0a1c698247aeabd8 x64
VSCode extensions:
- Fr43nk.seito-openfile@1.8.5
- ms-vscode.powershell@1.12.1
- rozzzly-dev.vscode-prompt-debug@0.0.2
PSES version: 1.12.1.0
PowerShell version:
Name Value
---- -----
PSVersion 5.1.16299.820
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.820
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
I am experiencing a problem with watching an item in a (large) array - the value is not displayed correctly (at all).
Expected Behaviour
Should be seeing the array value
Actual Behaviour
Array item is displayed as the empty string ""
but only on the left. Elsewhere (hover, locals) it’s displayed correctly
NOTE: I have verified this bug with all extensions (except the PowerShell extension of course) disabled.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
View array in Visual Studio debugger? - c++ - Stack Overflow
You can try this nice little trick for C++. Take the expression which gives you the array and then append a comma and...
Read more >How to Check if a JavaScript Array is Empty or Not with .length
To check if an array is empty or not, you can use the .length property. The length property sets or returns the number...
Read more >shell script - If Bash arrays can't contain a null string, how does ...
Why am I unable to see the null string when I use a regular for loop, but I can see it when I...
Read more >How to Check if an Array Is Empty in VBA
Just like how we used the split function to split a string into an array, a Join function can be used to concatenate...
Read more >Set a watch on variables - Visual Studio (Windows)
While you debug, see variables and expressions in Watch and QuickWatch. Watch can display several variables, QuickWatch only one, and only ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You might also notice the + in Watch is grayed out so I can’t add new watches. To be honest the whole Variables function is very dodgy/buggy and I have to often restart VSCode to get it to behave.
Oops apologies. You’re correct. I don’t know how I ended up here.