mapbox / variant

C++11/C++14 Variant
BSD 3-Clause "New" or "Revised" License
371 stars 101 forks source link

Visual Studio debugger support #155

Open BlueSolei opened 7 years ago

BlueSolei commented 7 years ago

I created a Visual Studio Native Visualizer file for variant. This file enable the debugger to view the value in a variant variable. There are two files here:

  1. Variant.natvis - the XML describe how to view the variant in VS debugger
  2. InstallVSDebuggerVariantSupport.bat - simple batch file to copy the nativs file to VS debugger folder
  3. One can also just add it to the project itself, the debugger will peek it up from there.

The natvis file support up to 20 types, if you think we need to support more, tell me and I will upload a new file. VS Natvis format requires to explicitly describe each variant (with 1, 2, 3... types). I use the boost::variant nativs file as a reference, and there it describe up to 20.

Enjoy :-)

VariantVSDebuggerSupoort.zip