Home > Software engineering >  Showing Swi-prolog backtrace?
Showing Swi-prolog backtrace?

Time:12-02

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.

CodePudding user response:

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

:- use_module(library(prolog_stack)).

is enough.

  • Related