According to the MSDN page on writing type visualizers, <IndexListItems>
are by definition contiguous:
IndexListItems Expansion
ArrayItems assume array elements are laid out contiguously in memory. Debugger gets to the next element by simply incrementing its pointer to the current element. To support cases where you need to manipulate the index to the value node, index list items can be used. Here’s a visualizer using ‘IndexListItems’ node: [….] The only difference between ArrayItems and IndexListItems is that the ‘ValueNode’ expects the full expression to the ith element with the implicit ‘$i’ parameter.
Also, might I point you at the Qt Labs VSTools repository and its documentation? In particular tools/Qt4EEAddin/qt5.natvis
looks a great deal like what I think you’re trying to write? (Or is it actually what you’re writing? ^_^) Either way, I think the best you can do is what is in qt5.natvis
, which has a special <DisplayString>
for empty QHashNodes
but does not try to elide empty buckets in the QHash
.