I would like to trace built-in append/3 in SWI-Prolog, but am getting the result immediately and cannot see what is going on in the middle.
Is there anything I have to do to enable trace for append?
?- trace .
true.
[trace] ?- append([a,b,c], [[],[2,3], b], X).
X = [a, b, c, [], [2, 3], b].
In SWI-Prolog, the append/3
predicate is defined in the lists
module, which contains the directive:
:- set_prolog_flag(generate_debug_info, false).
This SWI-Prolog proprietary directive instructs the compiler to skip tracing of any predicate definition inside the module. If you comment out the directive in the lists.pl
file in your SWI-Prolog installation, you should then be able to trace calls to the append/3
predicate or any other predicate defined in the module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With