I just learned about .natvis
files in Visual Studio and I've been setting up some for my Ruby C++ Extension project. http://msdn.microsoft.com/en-us/library/jj620914.aspx
However, then I tried to use one of the Ruby macro's in a conditional statement then I get errors:
Natvis: C:\Users\Thomas\Documents\Visual Studio 2013\Visualizers\SUbD.natvis(79,4): Error: identifier "NIL_P" is undefined
Error while evaluating 'NIL_P(value_)' in the context of type 'SUbD.so!SUbD::ruby::Numeric'.
The rule I'm trying is this:
<Type Name="SUbD::ruby::Numeric">
<DisplayString Condition="NIL_P(value_)">Ruby Numeric: Nil</DisplayString>
<DisplayString>Ruby Numeric: {value_}</DisplayString>
</Type>
In my project I am wrapping Ruby's VALUE
type in small C++ wrapper classes for common types such as String
, Hash
, Array
etc. And I've been able to set up natvis rules for these. But whenver I want to use some of the macros from the Ruby system I always get errors.
Is it not possible to use macros in natvis
files?