Subject: Re: [boost] [preprocessor metaprogramming] tools
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2012-07-29 09:38:19
> >> >I wanted to share with you something I've found very useful for
> >> >tracing/debugging macro metaprograms: the Eclipse CDT IDE has a
> >> >"macro stepper" that allows you to step through the expansion of a
> >> >macro step-by-step from the initial invocation to the final
> >> >expansion. (This feature can be accessed by using the "Explore Macro
> >> >Expansion" context menu item on a macro invocation.)
> >> This seems very nice, and probably can help especially when debugging
> >> deferred expressions. However, will it show when a macro is painted
> >> blue? That is really important to knowing why it didn't expand.
> > Unfortunately it does not show that. That would be a nice addition.
> Wouldn't it be possible to build something really useful on top of the
> Wave library?
The Wave tool ($BOOST_ROOT/tools/wave) allows generating traces for the
expansion of macros. See the docs for it's done
Macro tracing in Wave does not show when a macro has been painted blue,
however it allows following in detail what happens during the expansion of a
particular macro. The information about a macro being painted is available
and could be added to the tracing facility easily.