## 15 Debugging

— Loadable Function: rline = dbstop (func, line)

> Set a breakpoint in a function

> `func`
>   String representing the function name. When already in debug mode this should be left out and only the line should be given.
> `line`
>   Line you would like the breakpoint to be set on

> The rline returned is the real line that the breakpoint was set at.

> See also: dbclear, dbstatus, dbnext.

— Loadable Function: dbclear (func, line)

> Delete a breakpoint in a function

> `func`
>   String representing the function name. When already in debug mode this should be left out and only the line should be given.
> `line`
>   Line where you would like to remove the the breakpoint
> No checking is done to make sure that the line you requested is really a breakpoint. If you get the wrong line nothing will happen.

> See also: dbstop, dbstatus, dbwhere.

— Loadable Function: lst = dbstatus ([func])

> Return a vector containing the lines on which a function has breakpoints set.

> `func`
>   String representing the function name. When already in debug mode this should be left out.

> See also: dbclear, dbwhere.

— Loadable Function: dbwhere ()

> Show where we are in the code

> See also: dbclear, dbstatus, dbstop.

— Loadable Function: dbtype ()

> List script file with line numbers.

> See also: dbclear, dbstatus, dbstop.

— Built-in Function: val = debug_on_interrupt ()
— Built-in Function: old_val = debug_on_interrupt (new_val)

> Query or set the internal variable that controls whether Octave will try to enter debugging mode when it receives an interrupt signal (typically generated with `C-c`). If a second interrupt signal is received before reaching the debugging mode, a normal interrupt will occur.

— Built-in Function: val = debug_on_warning ()
— Built-in Function: old_val = debug_on_warning (new_val)

> Query or set the internal variable that controls whether Octave will try to enter the debugger when a warning is encountered.

— Built-in Function: val = debug_on_error ()
— Built-in Function: old_val = debug_on_error (new_val)

> Query or set the internal variable that controls whether Octave will try to enter the debugger when an error is encountered. This will also inhibit printing of the normal traceback message (you will only see the top-level error message).