You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Debug watched array item is shown as an empty string #1897
Keith Hill (@rkeithhill) I remember you talking about how a user could get a "logpoints"-like feature using the watch parameters... I believe that mechanism could also solve this problem, no?
Marc (@cawoodm) My suspicion is that the Watch window doesn't support an expression using the syntax expected. If you put the variable without the [0], does it show the whole array? We've been trying to track down what syntax if any allows you to watch a single array member, but haven't been able to find any documentation of that. Have you seen this work elsewhere?
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.
Activity
TylerLeonhardt commentedon Apr 18, 2019
Keith Hill (@rkeithhill) I remember you talking about how a user could get a "logpoints"-like feature using the watch parameters... I believe that mechanism could also solve this problem, no?
noambonnie commentedon Apr 22, 2019
Possibly related: Seeing empty string for a non-empty string (but also on mouse-oveR). I have a function with the following signature:
Then the following code:
Printing requestID with
fmt.Println(requestID)prints a result (as expected). Watch, mouse-over show""rjmholt commentedon Apr 22, 2019
noambonnie That looks like Go rather than PowerShell. Is this in the PowerShell extension?
rjmholt commentedon Apr 22, 2019
Marc (@cawoodm) My suspicion is that the Watch window doesn't support an expression using the syntax expected. If you put the variable without the
[0], does it show the whole array? We've been trying to track down what syntax if any allows you to watch a single array member, but haven't been able to find any documentation of that. Have you seen this work elsewhere?rkeithhill commentedon Apr 22, 2019
That syntax is correct and I can get a watch like
$arr[1]to display data.rjmholt commentedon Apr 23, 2019
Ok, so it works sometimes in the PowerShell extension?
Might be worth showing both
$OP_A1andOP_A1[0]in Marc (@cawoodm)'s case.noambonnie commentedon Apr 23, 2019
Oops apologies. You're correct. I don't know how I ended up here.
cawoodm commentedon Apr 24, 2019
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.