Skip to content

add .natvis file for visualizing svector contents in visual studio debugger - #55

Closed
malytomas wants to merge 1 commit into
martinus:mainfrom
ucpu:master
Closed

add .natvis file for visualizing svector contents in visual studio debugger#55
malytomas wants to merge 1 commit into
martinus:mainfrom
ucpu:master

Conversation

@malytomas

Copy link
Copy Markdown
Contributor

here is more information about these files:
https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2022

feel free to move the file anywhere else.

there are two lines added in the code, which provide (static constexpr!) data necessary to the debugger, as it cannot execute functions.

@martinus

Copy link
Copy Markdown
Owner

Thanks for this. The offsets check out against direct_data() and detail::storage<T>::offset_to_data, and the header change is free at runtime.

Picked it up in #58 (this PR has 'allow edits from maintainers' off), keeping your commit. Main change: the type was matched as ankerl::v1_0_3::svector<*>, but that namespace comes from ANKERL_SVECTOR_VERSION_*, so bumping the patch version would have silently broken it — now wildcarded to ankerl::*::svector<*>. Also made DisplayString show the size and mode, and documented it in the README.

One thing I couldn't check without MSVC: whether the debugger actually resolves the static constexpr members from the PDB. I assume you confirmed that when you wrote it?

@martinus martinus closed this in #58 Jul 27, 2026
@martinus

Copy link
Copy Markdown
Owner

Merged as 22a1ee4 via #58 — your commit is in main with your authorship intact. GitHub can't auto-close this because the repo uses rebase-merge, which rewrites SHAs. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants