How to prettily show objects with remote gdb in Visual Studio debugger (maybe by appropriate natvis file)?

410 Views Asked by At

I have a natvis file for showing complex structures and objects (e.g. nlohmann json or STL) which works well when debugging for x64-compiled code. But as soon as I switch the platform to ARM64 (yocto-sdk-5.4 with aarch64-poky-linux of Jan. 2020) and compile via cross-compiler and debug via remote gdb on my target, I cannot look into all such objects, e.g. nlohmann json nodes or STL strings.

I wonder if there is a special natvis file for remote gdb or what must be adapted to let Visual Studio display its structure of those objects prettily. Do you have ideas or solutions?

Note: If I look into those objects, I can see sub elements _M_p and _M_t which let me think pretty-printing is not enabled for gdb. Unfortunately, all solutions I find in the internet (to switch pretty printing on) are for Visual Studio Code but I have MSVC 2017.

0

There are 0 best solutions below