How to trace the embedded append / 3 in SWI-Prolog?
I would like to trace the embedded append / 3 in SWI-Prolog, but I get the result right away and can't see what's going on in the middle.
Is there anything I need to do to enable tracing to add?
?- trace .
true.
[trace] ?- append([a,b,c], [[],[2,3], b], X).
X = [a, b, c, [], [2, 3], b].
source to share
In SWI-Prolog, a predicate append/3
is defined in a module lists
that contains the directive:
:- set_prolog_flag(generate_debug_info, false).
This SWI-Prolog directive instructs the compiler to skip tracing any predicate definitions within a module. If you comment out a directive in a file lists.pl
in your SWI-Prolog installation, you will be able to keep track of calls to a predicate append/3
or any other predicate defined in a module.
source to share