Previous Topic

Book Contents

Book Index

Next Topic

Script Breakpoints

Script breakpoints provide additional control over the execution of the code. You can set breakpoints to the lines at which you want the code execution to pause, e.g. in order to analyse the state of the execution in that particular point.

Breakpoints are displayed as blue or red bullets on the left breakpoint bar.

Temporary versus Persistent Breakpoints

Two kinds of breakpoints can be used:

Temporary Breakpoint

  • applies to one code execution only
  • is denoted by a BLUE bullet
  • can be set/toggled in one of the following ways:
    • press the <Spacebar> key, or
    • double-click on the breakpoint bar (the left-most grey "shoulder" of the debugger window), or
    • use the 'Toggle Breakpoint' command of the 'Debug' menu

Persistent Breakpoint

  • is remembered until Valuemation is closed, i.e. it stays even when the Script Debugger is closed or the script modified (unless the line with the breakpoint is removed from the script)
  • is denoted by a RED bullet
  • can be set/toggled in one of the following ways:
    • press <Ctrl>+<Spacebar>, or
    • hold down <Ctrl> and double-click on the breakpoint bar

Breakpoint Context Menu

The breakpoint bar provides a context menu which contains the following items:

Command

Function / Meaning

Toggle Breakpoint

Toggles a breakpoint.

Toggle Permanent Breakpoint

Toggles a permanent breakpoint.

Breakpoint Properties

Opens the 'Breakpoint Properties' dialog box, see below. Active only when the context menu is called on a particular breakpoint.

Enable/Disable

Toggle the enable/disable status of a particular breakpoint (the one on which the context menu is called). When a breakpoint is disabled, it remains on the line but is not taken into account during code execution. A disabled breakpoint is denoted by a crossed bullet.

Enable All

Enables all breakpoints.

Disable All

Disables all breakpoints.

Remove All

Clears all breakpoints.

 

 

Help Image

Breakpoint Condition

Breakpoints can have a condition.

To set or modify the condition:

  • right-click the breakpoint to show its context menu and select 'Breakpoint Properties'
  • fill in the condition in the Python language (but exclude the 'if' keyword). A breakpoint with a condition is shown with a question mark in the bullet and the condition is shown also in the breakpoint tooltip. Execution will be stopped on the breakpoint only if the condition evaluates to true. If an exception occurs during evaluation of the breakpoint condition, the Breakpoint Properties dialog will be shown (the error message will be shown at the top in red letters), so you'll have a chance to fix the condition or disable the breakpoint.

    Help Image

See Also

Script Debugging

Opening the Script Debugger

Script Debug Menu

Evaluate Code Action

Variables Tree

Debug Stack