breakpoint_on(condition);
Conditional breakpoint. Activates the source debugger at any place in the script
code as soon as the given condition becomes true. Very useful for observing the
state of a certain variable during script execution.
Parameters:
condition - an expression that evaluates to false or true.
Remarks:
- The condition is evaluated after each instruction. Therefore a conditional
breakpoint slows down script execution remarkably and inflates the compiled
code; the given condition should be a simple comparison and not a complicated
formula.
- Breakpoints can only be set in the development engine, not in the release
engine.
- If [Esc] is pressed while the source debugger
is active, the conditional breakpoint is reset. The next break_on instruction
reactivates the breakpoint.
Speed:
Fast
Example:
breakpoint_on(x>1); // breakpoint, when x greater than 1
See also:
function,
breakpoint,
Debugging, debug_external,
debug_mode, wait