gnu-prolog

gprolog: Getting a stacktrace after an exception

泄露秘密 提交于 2019-11-26 04:55:47
问题 While using gprolog I often have exceptions without any kind of line numbers or context like this one: uncaught exception: error(instantiation_error,(is)/2) Without any kind of context. I know I can do a trace but it would take very long to debug it with trace since I need to execute a lot of things before getting to the place where the error occur. Any idea on how to have this stacktrace ? Or a dynamic trace / notrace ? EDIT: Or just automate the printing of the whole trace output. 回答1: