Run scripts/algorithms on data structures
[Omar] Say I have a large array of structure,
-
First I'd want to easily display selected field prominently (e.g. show me a quick preview with all "Name", "ID", "Pos") The static .natvis mechanism of Visual Studio is not good enough, because the fields we actually want to see change all the time! There should be enough support UI do you can select the root of an array, enter a shortcut and then input some text e.g. "Name" and you see the Name of all entries, and you can quickly add/remove that variable from the one-liner preview shown in the watch. The debugger could remember a list of the frequently used one-liners preview per data structure type so you can quickly change between them.
-
Then I want to easily do some filtering over my large sets. Maybe manual tagging/hiding of certain instances and then display only the tagged or not hidden instances? That's pretty simple/dumb and yet even this would be extremely valuable for debugging.
-
Or use selection script, to filter dynamically or to filter once and saved the filtered result. "only show instance where (Flags & 0x1000000) != 0" "only show instance where Name starts with "Hello""
I want to mention that I would find these improvements tremendously usefull. In my case, what I whished for remedy to have is a way to basically just append the field I want to see of the array elements behind the array syntax. So for example, when nodes.data,10, shows me 10 nodes from an array, I would like (nodes.data,10).names to show me the names member of the first 10 nodes.
This is one of the features that seems easy(-ish?) to achieve while being hugely useful. I also like all the other suggestion from Omar, but personally, this is the most pressing one.
This is on the list for 0.3.1.X. Will allow multiple columns of data specified from the "root" of the array. So things like you mentioned $.names or $.vec.x, and so forth (haven't yet nailed the syntax).