Step-through aspect-debugging
I'm sure I've asked this before, but I cannot find the thread in which it was answered (if I actually did).
Given an aspect, is it possible to step through my code (e.g. see the while Metalama is building the compile-time code? I'm trying to determine if a given type implements an IEnumerable, and if so, what the generic argument is for this IEnumerable, but I can't figure out how to peek inside it while debugging (Debugger.Break never hits) to see what precisely is happening. I tried following the instructions at https://doc.metalama.net/conceptual/aspects/testing/debugging-aspects#debugging-compile-time-logic I inserted
Given an aspect, is it possible to step through my code (e.g. see the while Metalama is building the compile-time code? I'm trying to determine if a given type implements an IEnumerable, and if so, what the generic argument is for this IEnumerable, but I can't figure out how to peek inside it while debugging (Debugger.Break never hits) to see what precisely is happening. I tried following the instructions at https://doc.metalama.net/conceptual/aspects/testing/debugging-aspects#debugging-compile-time-logic I inserted
Debugger.Break()
before my If statement, popped open a console window pointing at the project directory and ran dotnet build -p:MetalamaDebugCompiler=True
. It asked me to pick a debugger, so I selected VS 2022 and it opened, loaded some symbols and then indicated that the task had been cancelled and that was it. What am I missing about that process?
Thanks!5 Replies
There were some bugs in this debugging experience but they were fixed in 2023.3. Please try with this version and let me know how it went.
Will do - stepped out for the weekend, but I'll give it a shot Monday when I get back home.
Have a good time.
Could you consider doing an upcoming video showing how the debug experience works? I keep getting the breakpoint hit, but I cannot get it to actually show my source or really anything except the disassembly which renders the debugging experience not too useful.
What about this one? https://doc.metalama.net/videos/debugging
And for the source mapping issue I think this was solved in 2023.3.