Next: , Previous: , Up: FDBG Basics   [Contents][Index] Built-In Visualizers

The default visualizers are generic predicates to display FDBG events (see FDBG Events) in a well readable form. These visualizers naturally do not exploit any problem specific information—to have more “fancy” output, you have to write your own visualizers; see FDBG Writing Visualizers. To use these visualizers, pass them in the appropriate argument to fdbg_on/1; see FDBG Options, or call them directly from user defined visualizers.

fdbg_show(+Constraint, +Actions)

This visualizer produces a trace output of all woken constraints, in which a line showing the constraint is followed by a legend (see FDBG Legend) of all the variables appearing in it, and finally an empty line to separate events from each other. The usual output will look like this:

    fdvar_1 = inf..sup -> {0}
    Constraint exited.

Here, we can see an arithmetical constraint being woken. It narrows ‘fdvar_1’ to a domain consisting of the singleton value 0, and since this is the narrowest domain possible, the constraint does not have anything more to do: it exits.

Note that when you pass fdbg_show as an option, you should omit the two arguments, like in:

fdbg_on([…, constraint_hook(fdbg_show), …]).
fdbg_label_show(+Event, +LabelID, +Variable)

This visualizer produces a wallpaper trace output of all labeling events. It is best used together with fdbg_show/2. Each labeling event produces a single line of output, some of them are followed by an empty line, some others are always followed by another labeling action and therefore the empty line is omitted. Here is a sample output of fdbg_label_show/3:

Labeling [9, <list_1>]: starting in range 0..3.
Labeling [9, <list_1>]: step: <list_1> = 0

What we see here is the following:

Note that when you pass fdbg_label_show/3 as an option, you should omit the three arguments, like in

fdbg_on([…, labeling_hook(fdbg_label_show), …]).

Send feedback on this subject.