Skip to content

Conversation

@vmichal
Copy link
Contributor

@vmichal vmichal commented Jan 16, 2026

Changes to iterator visualization motivated by visualization of flat_meow:
The visualizer for _Deque_iterator can always detect == end() state since the iterator always has access to the underlying container. This is not always the case for _Span_iterator and _Vector_iterator, but only at non-zero _ITERATOR_DEBUG_LEVEL.

This PR adds a branch to the visualizer parsing logic to show the end condition at least in the debug build (which is most relevant for debugging after all).

before:
image

after:
image

Towards #5950 (specifically #5950 (comment))

@vmichal vmichal requested a review from a team as a code owner January 16, 2026 14:14
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jan 16, 2026
@vmichal vmichal changed the title STL.natvis: Harmonize visualization of _Vector_iterator and _Array_iterator, properly visualized end() iterators for vector and span when _ITERATOR_DEBUG_LEVEL != 2 STL.natvis: Harmonize visualization of _Vector_iterator and _Array_iterator, properly visualize end() _Vector_iterators and _Span_iterators when _ITERATOR_DEBUG_LEVEL != 2 Jan 16, 2026
@StephanTLavavej StephanTLavavej added the visualizer How the VS debugger displays STL types label Jan 16, 2026
@StephanTLavavej StephanTLavavej self-assigned this Jan 16, 2026
@StephanTLavavej StephanTLavavej removed their assignment Jan 17, 2026
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Jan 17, 2026
@vmichal vmichal changed the title STL.natvis: Harmonize visualization of _Vector_iterator and _Array_iterator, properly visualize end() _Vector_iterators and _Span_iterators when _ITERATOR_DEBUG_LEVEL != 2 STL.natvis: Harmonize visualization of _Vector_iterator and _Array_iterator, properly visualize end() _Vector_iterators and _Span_iterators when _ITERATOR_DEBUG_LEVEL != 0 Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

visualizer How the VS debugger displays STL types

Projects

Status: Ready To Merge

Development

Successfully merging this pull request may close these issues.

2 participants