Implement the features missing in natvis that autoexp.dat used to provide
The new natvis framework brings some improvements over autoexp.dat but sadly some key features from autoexp.dat have been lost, making it ****** and in some cases impossible to visualise types in natvis that could easily be visualised using autoexp.dat.
1. The loss of the $c notation means that it is no longer possible to reference the container object when defining the next pointer in a linked list. It is therefore not possible to correctly visualise a linked list that is teminated with an 'end node' held by the container because its address is not accessible at the point where it needs to be compared (please see http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/1b7c2caa-e3d4-41f8-9611-a1ab0a2ca301).
2. It is also no longer possible to display the items in a collection as part of the display string because natvis does not support adding a list of items to a display string as autoexp.dat used to.
3. There is no equivalent in natvis to the <,t> notation from autoexp.dat that displayed the most derived type name for the current type.
Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.
- The Visual Studio Team
Closing suggestions just because they get old is the surest way to alienate people. I had voted on several closed issues but won't bother participating if my voice is going to be ignored.
1. They support CustomListItems in VS2015 https://msdn.microsoft.com/en-us/library/jj620914.aspx#sectionToggle25
2. You can add it manually. Check std::tuple visualizer
Youngjoon Kim commented
I also have same problem visualizing my linked list since I cannot reference the container object when defining the next pointer.
I have the same hashmap problem as Anon and Daniel
My HashMap is a dynamic array with certain elements marked as non-existant. I can change the visualization of these elements, but would like to remove them entirely. I know this was possible with autoexp (I think Daniel's autoexp may be accomplishing this).
Daniel Laügt commented
With natvis, I'm not able to implement my old autoexp visualizer...
expr : ($e._hash_table)[$i],
size : $e._size
) : #(
size: &($e) != 0
head : $e,
next : _next_in_set
Mathias Westerdahl commented
Yeah, I miss the $c functionality the most. This really stops me in the tracks and I have to invent suboptimal ways of displaying simple things.
Jeremy Orme commented
The word that has been inexplicably bleeped out in my description is a synonym of difficult