SetBreakpointOnCurrentLine command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
|width="50%"| '''Action:'''
|width="50%"| '''Action:'''
|width="50%"|
|width="50%"|
<span class="f_Para">Sets a [[using_breakpoints.html#setting_breakpoint|breakpoint]] on the currently selected line in the </span><span class="f_GUIlabel">Source Code</span><span class="f_Para"> (or [[debug_req_spawn_daem.html|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. </span>
<span class="f_Para">Sets a [[Using breakpoints#Setting a single breakpoint|breakpoint]] on the currently selected line in the </span><var>Source Code</var><span class="f_Para"> (or [[Debugging requests that spawn daemons|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. </span>


'''Syntax:'''
'''Syntax:'''
Line 15: Line 15:
*<span class="f_ListBul1">If you execute this command for a line that already has a breakpoint set, no additional action is taken. </span>
*<span class="f_ListBul1">If you execute this command for a line that already has a breakpoint set, no additional action is taken. </span>


<span class="f_Para">For code lines for which no breakpoint is already set, the </span><span class="f_Monospace">[[togbreakpt_currentline.html|toggleBreakpointOn]]</span><span class="f_Para"> command has the same effect as the </span><span class="f_Monospace">setBreakpointOnCurrentLine</span><span class="f_Para"> command, and both commands have the same effect as double clicking a code line or right clicking a line and selecting </span><span class="f_GUIlabel">Toggle Breakpoint</span><span class="f_Para"> from the context menu. </span>
<span class="f_Para">For code lines for which no breakpoint is already set, the </span><span class="f_Monospace">[[toggleBreakpointOnCurrentLine command|toggleBreakpointOn]]</span><span class="f_Para"> command has the same effect as the </span><span class="f_Monospace">setBreakpointOnCurrentLine</span><span class="f_Para"> command, and both commands have the same effect as double clicking a code line or right clicking a line and selecting </span><var>Toggle Breakpoint</var><span class="f_Para"> from the context menu. </span>


'''Example:'''
'''Example:'''

Revision as of 03:35, 9 December 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