Skip to content

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

Closed
@jheydebrand

Description

@jheydebrand

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions