0

I figure it may not be built to do that but I might ask.

I want to run a simple cli application and have it show the backtrace in case of error.

swipl -f test.pl -g test(X)

This runs the goal test in the program.

ERROR: -g test(X): Arguments are not sufficiently instantiated

However, it doesn't show the full backtrace. What I need to do is every time, open the GUI, type guitracer,trace, run it, etc. That shows the program can keep a backtrace.

I figure it may not be built to do that but I might ask.

  • Did you try searching for "backtrace" before you asked? In roughly 5 seconds I found this: https://www.swi-prolog.org/pldoc/doc/_SWI_/library/prolog_stack.pl – TA_intern Nov 30 '21 at 06:36

1 Answers1

0

Can't believe I got lost in debugger pages. As said in comments,

:- use_module(library(prolog_stack)).

is enough.