3 ms·
> this is a nightmare for tooling I self-inflicted some pretty awful debugging woes due to C++ macros a few years back. VC++ is incapable of stepping into/thro
by zamalek 8y ago
> this is a nightmare for tooling
I self-inflicted some pretty awful debugging woes due to C++ macros a few years back. VC++ is incapable of stepping into/through macros - so a logical error in my macro had to be solved with good-old printf debugging. I learned my lesson about using macros sparingly.
This can obviously be alleviated with source maps. This presents a new set of dilemmas: does the developer want to debug the macro in its macro form, or its expanded form? Does the developer only want to debug a specific macro in expanded form, while keeping other macros expanded? How do you even debug a "case macro" in macro form? How do you debug the case macro code while it is expanding?