Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to expand VC++ macro references using Visual Studio?

Rather than right clicking on the macro identifier and then on "go to definition", is it possible to expand macro references and see what the code that is passed to the compiler looks like?

like image 331
J Smith Avatar asked Nov 10 '13 19:11

J Smith


People also ask

How do I edit macros in Visual Studio?

Edit the macroOn the DEVELOPER tab, in the Code group, click Macros. In the Macro name box, click the macro that you want to edit. Click Edit. The Visual Basic Editor appears.

What is macro expansion in C++?

The process of replacing a macro call with the processed copy of the body is called expansion of the macro call. In practical terms, there are two types of macros. Object-like macros take no arguments. Function-like macros can be defined to accept arguments, so that they look and act like function calls.

Where are Visual Studio macros stored?

A user-defined macro is stored in a property sheet. If your project doesn't already contain a property sheet, you can create one by following the steps under Share or reuse Visual Studio project settings.

How do I debug a macro in Visual Studio?

Open up a source file from your manage project in Visual Studio and set a breakpoint on a line. Start debugging in Visual Studio by pressing F5. In Excel, open up your worksheet and start debugging your VBA code using Excel's debugger.


1 Answers

"Project + Properties, C/C++, Preprocessor, Preprocess to a File = Yes. Compile and open the .i file in the build directory.

like image 191
J Smith Avatar answered Sep 28 '22 09:09

J Smith