Using the SWI-Prolog graphical tracer with Logtalk

Tips and tricks when running Logtalk using SWI-Prolog as the back-end compiler

Moderator: Paulo Moura

Post Reply
Paulo Moura
Logtalk developer
Posts: 475
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Using the SWI-Prolog graphical tracer with Logtalk

Post by Paulo Moura » Sun May 08, 2011 5:30 pm

Hi,

With the help of Jan, it's now possible to use the SWI-Prolog graphical tracer for debugging Logtalk source code. Despite being work in progress, the current status of this integration work is already useful. You will need the following:

- SWI-Prolog 5.11.20 or a later version (or an up-to-date git development version)
- Logtalk current development version

In order to debug a Logtalk application, you need to use the following settings before compiling your application source files:

Code: Select all

set_logtalk_flag(code_prefix, '.'), set_logtalk_flag(optimize, off), set_prolog_flag(optimise, off).
The Logtalk "debug" flag must be set to "off". The default "settings.lgt" file already contains a sample of these settings (commented out). You can simply copy this file to your application folder and uncomment the relevant lines.

Know issues:

- On Windows, syntax coloring is only partially working. This is a puzzling bug as the problem doesn't occur on Linux or MacOS X. But is only a cosmetic problem and should not affect tracing an application execution.
- On occasion, Logtalk raw code my show up on the graphical tracer window.

You feedback is appreciated. Enjoy,

Paulo
Paulo Moura
Logtalk developer

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest