I won’t call it “generated source”. Source is (IMO) something you wrote. The actual clause is not even in a temporary file. In theory it should be possible to list the generated clause and use that representation to set a breakpoint. That doesn’t exist. In this case I’d simply use ?- spy(test88).
I guess the remark is similar to the other: if you use goal/term expansion to turn a source code into something that lacks a one-to-one mapping between terms in the source code and goals in the final clause(s), you get a poor source level debugging experience. If rewriting merely rewrites goal arguments everything typically keeps working. On more elaborate changes that maintain this one-to-one mapping additional rules can be use to make the debugger work.
Got it, thanks. Yes for this example there are many variables created that aren’t in the original goal so this probably isn’t a great use of the system, at least from a debugging experience perspective.