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.

if (typeof(IEnumerable).IsAssignableFrom(prop.Type.ToType()))
            {
                var genericTypes = prop.Type.ToType().GetInterfaces().FirstOrDefault(t =>
                    t.IsGenericType && t.GetGenericTypeDefinition() == typeof(IEnumerable<>));
                if (genericTypes == null)
                    continue;

                var innerGenericType = genericTypes.GetGenericArguments()[0];


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!
Was this page helpful?