On Sunday, 2 October 2016 at 03:36:31 UTC, Manu wrote:
This comes up a lot.
As far as I know, it's not solved. What shall we do?

I feel like a simple solution would be to have the compiler emit a <filename>_mixin.d file populated with all the mixin expansions beside the .obj files, and have the debuginfo refer to that fabricated source file?

It might look a little bit weird jumping into code where the surrounding scope is not visible (unless that were copied over too?), but it's better than what we have now.

Are there any other commonly proposed solutions?

Yes, having the mixins expanded without the surrounding code would make it difficult to debug in some cases. Maybe generating the entire source with the expanded mixins is another option?

mycode.d
obj/mycode_processed.d

Maybe this idea could also be expanded to template instantiation?

Reply via email to