SetBreakpointOnCurrentLine command

From m204wiki
Jump to navigation Jump to search
Action:

Sets a breakpoint on the currently selected line in the Source Code (or Daemon) page; if the currently selected line is not an executable statement, sets a breakpoint on the next executable line after the currently selected line.

Syntax:

setBreakpointOnCurrentLine 

Notes:

  • If you have not explicitly selected a code line, the current line is the highlighted code line in the current execution position.
  • If you execute this command for a line that already has a breakpoint set, no additional action is taken.

For code lines for which no breakpoint is already set, the toggleBreakpointOn command has the same effect as the setBreakpointOnCurrentLine command, and both commands have the same effect as double clicking a code line or right clicking a line and selecting Toggle Breakpoint from the context menu.

Example:

This macro looks for a line that matches its argument; if it finds such a line, it sets a breakpoint on it:

selectsourcetab
searchFromTop &argstring
continueMacroIf &&searchSuccess
setBreakpointOnCurrentLine
set &message = &&concatenate("brks matching '", &argstring. "'")
setStatusMessage &message

To clear a breakpoint that is set on the current line, you can use the clearBreakpointOnCurrentLine command or the toggleBreakpointOn command.

See also the breaksAt and breaks commands.

Client menu: --
Introduced: Build 57