Breakpoint

Command group Flag affected Reversible Execute on client Platform(s)
Debugger NO NO NO All
Debugger NO NO YES (see note below) All

Syntax

Breakpoint {message}

Description

This command places a breakpoint at a command line in a method where you want to stop execution, to check your coding for example. You can include a message with the command which is displayed in the debug window when the break occurs. The command does nothing in the Runtime version of Omnis.

When Omnis encounters a breakpoint the debugger is opened with the current method loaded and the Breakpoint command line highlighted. You can examine the value of fields and variables by right button/Ctrl-clicking on the field or variable name.

Following a breakpoint you can continue method execution by clicking the Go button or by using Step or Trace mode.

The Breakpoint command is ignored if executed on a thread running on a multi-threaded Omnis Server.

NOTE: The Breakpoint command can be used in client-executed methods to set a 'hard' breakpoint in the code, but note that this will only be hit if the web browser developer tools are open. It will then break into the browser's debugger, in the JavaScript code which was generated from your client-executed method. The browser dev tools can usually be opened using the F12 key.

Example

# hit breakpoint when line 5 is processed so we can check the values of lMyList columns
For lMyList.$line from 1 to lMyList.$linecount step 1
  If lMyList.$line=5
    Do lMyList.$loadcols()
    Breakpoint {check lMyList columns}
  End If
End For