-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Visual Studio uses a three column grid to display a variable's name, value and type name. In VSCode we have a tree view and the tool window it is in is typically narrow. It is common to display variable name followed by its value. However PowerShell quite often has objects (composite variables) where the current variables display shows no value for objects.
I propose is that for expandable objects, we take advantage of the opportunity to display something. One option is the variable's short type name e.g.:
Of course since we've chosen to prefix variables with $
then perhaps we display type names using PowerShell syntax:
Another variation is to test the expandable object's ToString() return and if it is different than the type name, then display that instead. Here's an example of where this is useful. I can see the useful value of $pwd
without having to open the node:
In this case, I think seeing the path (ToString() value) is more useful than seeing [PathInfo]
.
What are your thoughts on this? The implementation is a trivial change to VariableDetails.cs. Personally, I'm leaning towards the last example of using either the type name or ToString()
if it is different.