Debugging

BAP Online Manuals : XWIO: X-Windows Front Server : Debugging
Previous: The Debug Menu
Next: The Debug Window

5.8. Debugging

A PROLOG program that has been compiled using the 'trace' option (please refer to the Compiler Reference Manual for detailed information) can easily be debugged using the BAP source level debugger. There is no restriction concerning the number of processes to be debugged at the same time. The execution of a ' trace(on) ' predicate halts the program and pops up the 'Trace List'.

The Trace List:
Here the processes are listed by their TID/PID identification, name and status. This status can be one of the following:

  • Waiting: The process is halted; it waits for a 'Step' command (button 'Step' in a Debug Window or clicking on 'wait' in the 'Trace List').

  • Active: The process is working. After executing the current subgoal it will return to the 'Waiting' status.

  • Auto: The process is in single step mode, but the server automatically sends 'Step' commands as soon as the process sends a 'trace' message. This allows visual control of the program flow without manually stepping through each goal.

  • Running: The process is active and will not halt unless it reaches a ' trace(on) ' command or is halted by the user. No trace messages are sent to the server.

The status of processes in the process list can be changed with the 'Wait/Auto/Run' buttons on the left side of the Trace List dialog.

The 'Ignore Trace' option causes all ' trace(on) ' messages to be ignored. This function can be switched for each process separately in the ' Debug Window '.

The 'Debug ' button opens up a Debug Window containing the currently selected process. If such a window already exists for this process, it is activated. This is indicated by a '*' in the 'Trace List'.

A process that has not reached a ' trace(on) ' command can be added to the 'Trace List' with the 'Add ' button. A process can be selected from the 'Process List' or its TID/PID can be entered manually.

The 'Remove' button removes the selected process from the 'Trace List' and switches it's status to 'running'.

The 'Ok' button closes the Trace list dialog. this does not change the status of any process or Debug Window .

Further information: debugging Example


BAP Online Manuals : XWIO: X-Windows Front Server : Debugging
Previous: The Debug Menu
Next: The Debug Window