(octave.info)Debug Mode
13.4 Debug Mode
===============
There are three additional support functions that allow the user to find
out where in the execution of a script Octave entered the debug mode,
and to print the code in the script surrounding the point where Octave
entered debug mode.
-- : dbwhere
In debugging mode, report the current file and line number where
execution is stopped.
See also: Note: dbstack, Note: dblist,
Note: dbstatus, Note: dbcont, Note:
dbstep, Note: dbup, Note: dbdown.
-- : dbtype
-- : dbtype LINENO
-- : dbtype STARTL:ENDL
-- : dbtype STARTL:END
-- : dbtype FUNC
-- : dbtype FUNC LINENO
-- : dbtype FUNC STARTL:ENDL
-- : dbtype FUNC STARTL:END
Display a script file with line numbers.
When called with no arguments in debugging mode, display the script
file currently being debugged.
An optional range specification can be used to list only a portion
of the file. The special keyword "end" is a valid line number
specification for the last line of the file.
When called with the name of a function, list that script file with
line numbers.
See also: Note: dblist, Note: dbwhere,
Note: dbstatus, Note: dbstop.
-- : dblist
-- : dblist N
In debugging mode, list N lines of the function being debugged
centered around the current line to be executed.
If unspecified N defaults to 10 (+/- 5 lines)
See also: Note: dbwhere, Note: dbtype,
Note: dbstack.
You may also use ‘isdebugmode’ to determine whether the debugger is
currently active.
-- : isdebugmode ()
Return true if in debugging mode, otherwise false.
See also: Note: dbwhere, Note: dbstack,
Note: dbstatus.
Debug mode also allows single line stepping through a function using
the command ‘dbstep’.
-- : dbstep
-- : dbstep N
-- : dbstep in
-- : dbstep out
-- : dbnext ...
In debugging mode, execute the next N lines of code.
If N is omitted, execute the next single line of code. If the next
line of code is itself defined in terms of an m-file remain in the
existing function.
Using ‘dbstep in’ will cause execution of the next line to step
into any m-files defined on the next line.
Using ‘dbstep out’ will cause execution to continue until the
current function returns.
‘dbnext’ is an alias for ‘dbstep’.
See also: Note: dbcont, Note: dbquit.
When in debug mode the <RETURN> key will execute the last entered
command. This is useful, for example, after hitting a breakpoint and
entering ‘dbstep’ once. After that, one can advance line by line
through the code with only a single key stroke.
automatically generated by info2www version 1.2.2.9