Sorry, a correction (I got the debug_module commands backwards):
- For a 'user file' (file with no module declaration):
?- debug_module(user).
?- ensure_loaded('/tmp/foo.pl').
?- trace.
- For a module:
?- debug_module(foo).
?- use_module('/tmp/foo.pl').
?- trace.
Then:
?- p(X).
1 1 Call: user:p(X) ?
--
----------------------- The Ciao System Development Team --------------------
The CLIP Group | IMDEA Software Institute
ciao(a)clip.dia.fi.upm.es | and Technical University of Madrid
http://www.ciao-lang.org /
http://www.cliplab.org
-----------------------------------------------------------------------------