I\'ve got a pretty complicated macro inside my (unmanaged) C++ code. Is there any way to expand macros in VS debugger? Or maybe there is another way to debug macros there?
I learned from http://www.codeproject.com/Tips/320721/Macro-expansion-in-VCplusplus the best way to debug macros.
And what i do is to create a cxx file named "test.cxx" and inside i only put the macro and a some uses example of a test.cxx:
#define GetMacro(param1) \
public: void Get##param1(){ return m_##param1; }
GetMacro(MyVariable);
and in a command line i enter:
c:\ cl /EP test.cxx > output.cxx
When i open the output.cxx file there should be some blank lines and at the bottom the expanded macro, like:
public: void GetMyVariable(){ return m_MyVariable; };
You can test macros without compiling and that makes it quick.