microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
818 stars 218 forks source link

Wrong numeration after first 50 items with multidimensional arrays in natvis (Linux) #1403

Closed NValerij closed 1 year ago

NValerij commented 1 year ago

Hi. I’m using natvis to view my rather complex custom data type in VS Code (1.78.2, C/C++ v1.15.4, Ubuntu 20.04). There is a fragment of matrix visualizer (unfortunately, CustomListItems does not work in Linux, #929):

            <ArrayItems Condition="Memory != 0">
                <Direction>Forward</Direction>
                <Rank>2</Rank>
                <Size>$i == 0 ? Rows : Cols</Size>
                <ValuePointer>(($T1*)(Memory->Segments[Segment].Data + Offset))</ValuePointer>
            </ArrayItems>

Imagine, I have matrix with Rows = 1 and Cols = 256. In Variables window it looks like this: image

I expect that after [0, 49] I’ll see [0, 50] and so on until [0, 255], but couters are reset after [0, 49]. Values to the right are correct (I’ve checked them on another example).