debug mixins

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 14 20:50:21 PDT 2017


On Wednesday, March 15, 2017 03:43:20 Inquie via Digitalmars-d-learn wrote:
> So, is it possible to debug string mixins?
>
> I ran visual D and tried to step in to a function that was
> generated by a mixin and it brought an open file dialog box
> asking me to load the source code where the function was
> located... of course, it wasn't located anywhere except in the
> mixin string.
>
>
> This leads to the idea, why can't the compiler simply output the
> mixin string to a file then the debugger can load that source
> file?
>
> One of the most frustrating things about D is not having the
> ability to debug it's powerful meta programming in any reasonable
> way. (bad enough having to resort to using pragma(msg))
>
> But we can't even debug the results of those meta programming in
> the case of string mixins because there is no way to step in to
> them... It seems all the machinery is there, but just a few extra
> steps are needed.

Related: https://issues.dlang.org/show_bug.cgi?id=5051

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list