Are there macro debug guidelines?
Additionally to macro design guidelines such as don’t use macros with side effects [e.g. with macro parameters being referenced not exactly once] and have the macro argument references fully parenthesized [to suppress problems with operator precedences], some rules can be formulated on how to approach macro design safely and make macro debugging easier: If the macro expression is other than trivial, implement things as a function [first]. If using C++ [instead of C], consider inlined functions [or templates]. Debugging macros in the sense of stepping through them usually requires them to be transferred into the form of functions [too; which e.g. provides single code locations to set breakpoints].