"In debug mode, Prolog stops at spy and trace points..." It actually only stops at spy points. Trace points set via trace/1 or trace/2 never stop for user input, they just output traces. And: they will output traces regardless of the state of the debug flag (or the tracing flag for that matter):
is_a(rock1, rock). is_a(rock2, rock). color(rock1, red). noun(X, Type) :- is_a(X, Type).
?- trace(is_a/2). % is_a/2: [all] true. ?- debugging. % Debug mode is off true. ?- tracing. false. ?- noun(X, rock). T Call: is_a(_17058, rock) T Exit: is_a(rock1, rock) X = rock1 ; T Redo: is_a(rock1, rock) T Exit: is_a(rock2, rock) X = rock2.