The Debug Window
Previous: Debugging
Next: Debugging Example
5.9. The Debug Window
A Debug Window consists of several controls and two display regions. The Tid/Pid identification of the current process is displayed in the window's title bar. In the upper part of the window the trace messages sent by the current process are displayed. These consist of the current goal and its variables. The lower window displays the corresponding part of the source code with the current goal highlighted. The programmer can 'Step' through the program or change its status in the same way as in the 'Trace List' (see Debugging ).
The control panel in the middle of the Debug Window contains several buttons:
- 'Close' : removes the window. This does not change the state of the
process.
- 'Trace List' : pops up a Trace List
dialog.
- 'Database' displays the contents of the PROLOG process database.
- 'Messagebase' displays the messages pending int the process messagebase.
- 'Step' causes the next goal to be executed, switching the process status
from 'waiting' to 'active'. The status will switch back to 'waiting' as soon as the
next source line in a traceable module is reached. This may be the next line in
the current file or a predicate called by the current goal.
If the current process is in state 'Running', it will switch to 'Active' and
halt at the next traceable instruction.
- 'Skip' executes the next goal without stepping through its subgoals.
Execution will halt inside subgoal code only if a new trace(on) call is found.
- 'Fail' causes the next goal to fail.
- 'Auto' switches the process to auto mode. This results in animated execution
of the code, every step is displayed in the debugging window without waiting
for 'Step' commands.
- 'Run' switches the process to run mode. The process executes up to
the next ' trace(on) ' predicate.
- 'local ignore trace' enables trace ignoring for this process. This
means that the process will not halt execution when a trace(on)
call is found. Execution can be stopped manually by pressing 'step' to switch
back to single stepping.
Further information: trace For a 'hands on' example of BAP source level debugging taka a look at the debugging Example .
BAP Online Manuals : XWIO: X-Windows Front Server : The Debug Window
Previous: Debugging
Next: Debugging Example