Skip to content
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

MSVC natvis visualizer does not work after introduction of inline ABI namespace #3696

Closed
2 tasks
jheydebrand opened this issue Aug 11, 2022 · 1 comment · Fixed by #3697
Closed
2 tasks
Labels
confirmed kind: bug platform: visual studio related to MSVC solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@jheydebrand
Copy link

Description

#844 added a debugger visualizer for Visual Studio.
#3590 introduced an inline namespace under which the basic_json type now lives.

Therefore the type name pattern in the natvis file

<Type Name="nlohmann::basic_json&lt;*&gt;">
does not match the actual type anymore which means the visualizer does not work anymore.

With the inline namespace regularly changing, it might be worthwhile to dynamically generate the natvis file from CMake using the same "algorithm" for the type name pattern as implemented with the macros in the source code.

Reproduction steps

Create a nlohmann::json instance, fill it with some data, and break with Visual Studio debugger to inspect the object instance.

Expected vs. actual results

Actual: visualizer not active
Expected: visualizer provides pretty printing

Minimal code example

No response

Error messages

No response

Compiler and operating system

Visual Studio

Library version

3.11.1

Validation

@falbrechtskirchinger
Copy link
Contributor

On it. I think this is the thing I've been trying to remember, so, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed kind: bug platform: visual studio related to MSVC solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants