== Quote from Trass3r ([email protected])'s article
> I often use mixins in my code.
> This is nice programming-wise but really becomes painful when trying to
> debug cause it completely messes up dmd's line numbers.
> Is there any solution to this in D?
> Could we have some sort of "preprocessed source code" and use that for
> debugging?

Use #line on the first line of the mixin.

ie:
const gen_variant = `
    #line 42
    int ` ~ name ~ ` = 4.2f; // <- This is the real line 42 in the source file

`;


Regards

Reply via email to