SWI-Prolog Did You Know Did you know? you can turn terms into graphviz (.dot) files Search Documentation:
PL_prolog_debug()