Contents Previous Next Subchapters

Setting And Listing Debugger Break Points
Syntax break
break 
line
See Also dbreak , skip , stop , continue
Abbreviation b
Menu Command Debug | Set Breakpoint . . .
Debug | List Breakpoints

Description
Sets a breakpoint (where execution will be suspended) at the specified line in the current debugger listing file. If line is not present in the command, the current breakpoints are listed.


The hand icon in the toolbar , together with an editor window, can be used to make the setting of break points much easier.

Example
If the file TEMP.OMS in the current working directory contains
     function fac(n) begin
          if n==1 then return 1
          return n * fac(n - 1)
     end
and at the O> prompt you enter
     clear
     stop
O-Matrix will activate the Debugger window and display the DEBUG> prompt. If you then enter
     file TEMP.OMS
O-Matrix will list the file TEMP.OMS with line numbers. If you enter
     dall
     break 2
     break
O-Matrix will respond
    index     skip     line   file                                    
        1        0        2   C:\OMWIN\TEMP.OMS                       
(the actual file name will depend on the current directory). If you continue by entering
     continue
O-Matrix will activate the Command window and display the O> prompt. If you continue by entering
     include TEMP.OMS
     fac(1)
O-Matrix will activate the Debugger window, with the arrow pointing to the second line of TEMP.OMS and a message identifying the index of the debugger break point that caused it to stop. If you then enter
     continue
O-Matrix will respond
     1
which is the value of fac(1).