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
Variable responses contain name and value for each child variable. With array elements, we can stick the unique index in the name and use the value for the value. With map elements, a common approach (e.g. used by Python and Go) is to use name for key's value and value for value's value. This breaks if the display version of the key is not unique because vscode appears to be dropping variables with duplicate names.
We keep running into this issue with vscode-go. Historically, vscode-go used only the variable type as the value of the variable for structured variables plus a variable reference to load more info. But with structured map keys as names that doesn't work. Every key value ends up with the exact same name string - its type, so a map ends up with only one entry. See golang/vscode-go#1042.
I fixed this issue in the new adapter by adding a unique suffix. But now I am seeing the same issue with long strings truncated by the debugger to a non-unique prefix. Here is an example:
This is the response that is associated with the above image:
This doesn't seem right. Sure the users are missing out on the full info if the name is truncated or simplified, but it is still a good placeholder that gives access to the value, to evaluateName for watches and to a variableReference to expand for more info. But if the entry is missing altogether, all those benefits disappear. I think vscode should display all variables form the response as-is.
Does this issue occur when all extensions are disabled?: No
The text was updated successfully, but these errors were encountered:
Variable responses contain name and value for each child variable. With array elements, we can stick the unique index in the name and use the value for the value. With map elements, a common approach (e.g. used by Python and Go) is to use name for key's value and value for value's value. This breaks if the display version of the key is not unique because vscode appears to be dropping variables with duplicate names.
We keep running into this issue with vscode-go. Historically, vscode-go used only the variable type as the value of the variable for structured variables plus a variable reference to load more info. But with structured map keys as names that doesn't work. Every key value ends up with the exact same name string - its type, so a map ends up with only one entry. See golang/vscode-go#1042.
I fixed this issue in the new adapter by adding a unique suffix. But now I am seeing the same issue with long strings truncated by the debugger to a non-unique prefix. Here is an example:
This is the response that is associated with the above image:
This doesn't seem right. Sure the users are missing out on the full info if the name is truncated or simplified, but it is still a good placeholder that gives access to the value, to evaluateName for watches and to a variableReference to expand for more info. But if the entry is missing altogether, all those benefits disappear. I think vscode should display all variables form the response as-is.
Does this issue occur when all extensions are disabled?: No
The text was updated successfully, but these errors were encountered: