-
Notifications
You must be signed in to change notification settings - Fork 1.6k
STL.natvis: Simplify visualization for string_view
#5176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STL.natvis: Simplify visualization for string_view
#5176
Conversation
|
here's relevant bug report https://developercommunity.visualstudio.com/t/Bad-debug-visualizers-for-std::string_vi/10808901 |
|
I pushed a small change to add the same |
|
What do you guys @StephanTLavavej @CaseyCarter think about my last comment, specifically this part: update: perhaps, this all can be simplified with single version that uses |
I'd be happy to see this in a separate PR. |
Yes, that's irrelevant for this PR. Here's simplified visualizers for std::string |
|
FYI, this PR works with all char types except with One other issue: string_view::iterator doesn't look like string::iterator in debugger. This also needs to be addressed. Should this all be done in this PR? |
We only care that
I see, it looks like we're missing some |
|
I didn't want to drastically change the PR, but this is the version that works best for me: STL.natvis: Fix visualization for string_view Let me know is I should override this PR with that diff. In short, it works for all types and matches I used this code to test. Note, the test code has weird stuff like It has only minor inconsistency with |
|
|
Yes, that's problematic. As mentioned in the other thread, perhaps it all can be eliminated |
`std::string_view` should be shown similar to `std::string` in debugger for basic view.
b29ee9a to
432abba
Compare
|
I used this code to test: All visualizers for This is sample debugger view for |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for making this simpler, and congratulations on your first microsoft/STL commit! 💚 🎉 😸 We still need to "triple-mirror" this change into VS before it will actually take effect. |








std::string_viewshould be shown similar tostd::stringin debugger for basic view.