Node:Condition Macros, Next:, Previous:Past States, Up:Breakpoint Conditions



Condition Macros

There are a few condition macros expanding to a list of other conditions:

unleash
Expands to [show(print),command(proceed)]
hide
Expands to [show(silent),command(proceed)]
leash
Expands to [show(print),command(ask)]

The user can also define condition macros using the hook below.

breakpoint_expansion(+Macro, -Body) [Hook]
user:breakpoint_expansion(+Macro, -Body)

This predicate is called with each (non-composite) breakpoint test or action, as its first argument. If it succeeds, then the term returned in the second argument (Body) is substituted for the original condition. The expansion is done both at the time the breakpoint is added (for syntax checking) and each time the Macro is evaluated.

Note that Body can be composite, but it cannot be of form Tests-Actions. This means that the whole Body will be interpreted as being in either the test or the action part, depending on the context.