是否可以扩展宏引用并查看传递给编译器的代码是什么样的,而不是右键单击宏标识符然后单击“转到定义”?
答案 0 :(得分:15)
"项目+属性,C / C ++,预处理器,文件预处理=是。编译并打开构建目录中的.i文件。
答案 1 :(得分:4)
I heard all possible negative answers on the topic:
They are all true, but IMO they collide with the reality of everydays programming.
In fact, working on old C project where macros, where mostly simply used as functions, this became of crucial importance for me. Generating all preprocessed files with /P works but is overkilling and time taking. I just needed a tool that expands a simple macro defined a few lines above or at maximum in other file.
How to do that?
So, Yes, in a practical sense, it is possible.
答案 2 :(得分:0)
自VS2017以来,您可以在快速信息工具提示中看到宏扩展。一个非常酷的新功能。