Author Topic: #define tracing, ability to show what a macro would expand to  (Read 3171 times)

MikeDavies

  • Community Member
  • Posts: 11
  • Hero Points: 1
#define tracing, ability to show what a macro would expand to
« on: August 11, 2010, 09:01:30 AM »
#define tracing:  it should be possible to select a #define'd symbol and cause it to be expanded completely to it final value as the compiler would.  This should take into account compile time constants defined in make etc.

Mike

volovyan

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Re: #define tracing, ability to show what a macro would expand to
« Reply #1 on: September 19, 2014, 09:23:39 PM »
C/C++ macro expansion support with ability to show expansion steps. Especially useful if ## are used in the macro.
If I am not mistaken, currently only Eclipse supports this.

jwiede

  • Senior Community Member
  • Posts: 112
  • Hero Points: 12
Re: #define tracing, ability to show what a macro would expand to
« Reply #2 on: December 08, 2014, 10:22:48 PM »
C/C++ macro expansion support with ability to show expansion steps. Especially useful if ## are used in the macro.
If I am not mistaken, currently only Eclipse supports this.

+1 to this suggestion -- it would be nice if SE could serve as a "C/C++ macro previewer/debugger" showing the expansion steps, indicating the step where expansion fails (when it does), etc.

jwiede

  • Senior Community Member
  • Posts: 112
  • Hero Points: 12
Re: #define tracing, ability to show what a macro would expand to
« Reply #3 on: August 21, 2017, 02:31:42 AM »
#define tracing:  it should be possible to select a #define'd symbol and cause it to be expanded completely to it final value as the compiler would.  This should take into account compile time constants defined in make etc.

Mike

Another excellent request, any hope we'll see something like the above in V22?