Printing Options

print -- This option prints the current goal using print/1 and the current debugger print depth limit. The depth limit prevents very large structures from being shown in their entirety; it can be changed with the < (set depth) option (see below).
write -- This option writes the current goal on the terminal using write/1. This may be useful if your "pretty print" routine (portray/1) is not doing what you want. The write option has no depth limit.
display -- This option displays the current goal on the terminal using display/1. This shows the goal in prefix notation. The display option has no depth limit.
ancestors -- This option prints the list of ancestors of the current goal (that is, all goals that are between the current goal and the top-level goal in the calling sequence). Each ancestor goal is printed using print/1 with the current debugger depth limit. Goals shown in the ancestor list are always accessible to invocations for the r (retry) option.
g n
ancestors --

This is a version of the g option, which prints only n ancestors. That is, the last n ancestors will be printed counting back from the current goal.

< n
set depth -- This option sets the debugger print depth limit to n. This limit determines the depth to which goals are printed when they are shown by the debugger. The depth limit is also used when showing the ancestor list. If n is 0, or is omitted, the debugger will then use no limit when printing goals. The default limit is 10.