Macro Expansion

You can inspect the code generated by the expansion of a macro in two ways:

  • inline: DVT replaces the macro call with the generated code in place; the expanded code is guarded by pragmas that allow DVT to collapse the code back to the original

  • in a separate editor: DVT opens a new editor window that shows the generated code

To expand

Place the cursor on a macro call in the editor and use one of the following expansion commands:

  • DVT: Expand Macro All Levels

  • DVT: Expand Macro All Levels Inline

To collapse

Place the cursor on the expansion start pragma, and use the DVT: Collapse Inline Macro Expansion.

../../_images/macro_expansion_from_context_menu_eLang.gif

Danger

Do not modify the pragmas generated by DVT because this might break the collapse functionality!

Note

The pragmas are:

  • @DVT_EXPAND_MACRO_INLINE_START

  • @DVT_EXPAND_MACRO_INLINE_ORIGINAL

  • @DVT_EXPAND_MACRO_INLINE_END