From 82e95712135bd2b1769c2932d46973653b29126b Mon Sep 17 00:00:00 2001 From: peterchen-cp Date: Sun, 24 Mar 2019 22:02:09 +0100 Subject: [PATCH] Add MSVC Debugger Visualizer config for YAML::Node (#693) --- src/contrib/yaml-cpp.natvis | 32 ++++++++++++++++++++++++++++++++ src/contrib/yaml-cpp.natvis.md | 9 +++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/contrib/yaml-cpp.natvis create mode 100644 src/contrib/yaml-cpp.natvis.md diff --git a/src/contrib/yaml-cpp.natvis b/src/contrib/yaml-cpp.natvis new file mode 100644 index 0000000..d5c222b --- /dev/null +++ b/src/contrib/yaml-cpp.natvis @@ -0,0 +1,32 @@ + + + + + {{invalid}} + {{pNode==nullptr}} + {{ {*m_pNode} }} + + m_pNode->m_pRef._Ptr->m_pData._Ptr->m_scalar + m_pNode->m_pRef._Ptr->m_pData._Ptr->m_sequence + m_pNode->m_pRef._Ptr->m_pData._Ptr->m_map + m_pNode->m_pRef._Ptr->m_pData._Ptr + + + + + {{node:pRef==nullptr}} + {{node:pRef->pData==nullptr}} + {{undefined}} + {{{m_pRef._Ptr->m_pData._Ptr->m_scalar}}} + {{ Map {m_pRef._Ptr->m_pData._Ptr->m_map}}} + {{ Seq {m_pRef._Ptr->m_pData._Ptr->m_sequence}}} + {{{m_pRef._Ptr->m_pData._Ptr->m_type}}} + + m_pRef._Ptr->m_pData._Ptr->m_scalar + m_pRef._Ptr->m_pData._Ptr->m_sequence + m_pRef._Ptr->m_pData._Ptr->m_map + m_pRef._Ptr->m_pData._Ptr + + + + diff --git a/src/contrib/yaml-cpp.natvis.md b/src/contrib/yaml-cpp.natvis.md new file mode 100644 index 0000000..f1d68a8 --- /dev/null +++ b/src/contrib/yaml-cpp.natvis.md @@ -0,0 +1,9 @@ +# MSVC debugger visualizer for YAML::Node + +## How to use +Add yaml-cpp.natvis to your Visual C++ project like any other source file. It will be included in the debug information, and improve debugger display on YAML::Node and contained types. + +## Compatibility and Troubleshooting + +This has been tested for MSVC 2017. It is expected to be compatible with VS 2015 and VS 2019. If you have any problems, you can open an issue here: https://github.com/peterchen-cp/yaml-cpp-natvis +