Next: , Up: FDBG Basics   [Contents][Index]


10.14.3.1 FDBG Options

FDBG is switched on and off with the predicates:

fdbg_on
fdbg_on(:Options)

Turns on FDBG by putting advice points on several predicates of the CLP(FD) module. Options is a list of options; see FDBG Options. The empty list is the default value.

fdbg_on/[0,1] can be called safely several times consecutively; only the first call will have an effect.

fdbg_off

Turns the debugger off by removing the previously installed advice points.

fdbg_on/1 accepts the following options:

file(Filename, Mode)

Tells FDBG to attach the stream alias fdbg_output to the file called Filename opened in mode Mode. Mode can either be write or append. The file specified is opened on a call to fdbg_on/1 and is closed on a call to fdbg_off/0.

socket(Host, Port)

Tells FDBG to attach the stream alias fdbg_output to the socket connected to Host on port Port. The specified socket is created on a call to fdbg_on/1 and is closed on a call to fdbg_off/0.

stream(Stream)

Tells FDBG to attach the stream alias fdbg_output to the stream Stream. The specified stream remains open after calling fdbg_off/0.

If none of the above three options is used, then the stream alias fdbg_output is attached to the current output stream.
 

constraint_hook(Goal)

Tells FDBG to extend Goal with two (additional) arguments and call it on the exit port of the constraint dispatcher.

no_constraint_hook

Tells FDBG not to use any constraint hook.

If none of the above two options is used, then the default is constraint_hook(fdbg:fdbg_show).
 

labeling_hook(Goal)

Tells FDBG to extend Goal with three (additional) arguments and call it on any of the three labeling events.

no_labeling_hook

Tells FDBG not to use any labeling hook.

If none of the above two options is used, then the default is labeling_hook(fdbg:fdbg_label_show).

For both constraint_hook and labeling_hook, Goal should be a visualizer, either built-in (see FDBG Built-In Visualizers) or user defined. More of these two options may appear in the option list, in which case they will be called in their order of occurrence.

See FDBG Writing Visualizers for more details on these two options.



Send feedback on this subject.