SetBreakpointOnCurrentLine command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__TOC__ {| |width="50%"| '''Action:''' |width="50%"| <span class="f_Para">Sets a breakpoint on the currently selected line in th...")
 
No edit summary
Line 28: Line 28:
<span class="f_CodeExampleTable" style="font-size: 12px;">setStatusMessage &amp;message </p>
<span class="f_CodeExampleTable" style="font-size: 12px;">setStatusMessage &amp;message </p>


<span class="f_Para">To clear a breakpoint that is set on the current line, you can use the </span><span class="f_Monospace">[[clearbreakpointoncurrentline_cmd.html|clearBreakpointOnCurrentLine]]</span><span class="f_Para"> command or the </span><span class="f_Monospace">toggleBreakpointOn</span><span class="f_Para"> command. </span>
<span class="f_Para">To clear a breakpoint that is set on the current line, you can use the </span><span class="f_Monospace">[[ClearBreakpointOnCurrentLine command|clearBreakpointOnCurrentLine]]</span><span class="f_Para"> command or the </span><span class="f_Monospace">toggleBreakpointOn</span><span class="f_Para"> command. </span>


<span class="f_Para">See also the </span><span class="f_Monospace">[[breaksat_cmd.html|breaksAt]]</span><span class="f_Para"> and </span><span class="f_Monospace">[[breaks_cmd.html|breaks]]</span><span class="f_Para"> commands. </span>
<span class="f_Para">See also the </span><span class="f_Monospace">[[BreaksAt command|breaksAt]]</span><span class="f_Para"> and </span><span class="f_Monospace">[[Breaks command|breaks]]</span><span class="f_Para"> commands. </span>
|-
|-
| '''Client menu:'''
| '''Client menu:'''

Revision as of 18:43, 9 July 2022

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