Mercurial > hg > octave-lyh
changeset 7817:31fb919ba0c0
Add the debug function
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 25 May 2008 16:32:30 +0200 |
parents | ddecf2eb1910 |
children | 5640a70cbab1 |
files | scripts/ChangeLog scripts/miscellaneous/Makefile.in scripts/miscellaneous/debug.m |
diffstat | 3 files changed, 87 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,8 @@ 2008-06-02 David Bateman <dbateman@free.fr> + * miscellaneous/debug.m: New file.. + * Makefile.in (SOURCES): Add it to the list. + * general/interp1q.m: Remove spaces between functions and args in []. Fix test code to actually test interp1q.
--- a/scripts/miscellaneous/Makefile.in +++ b/scripts/miscellaneous/Makefile.in @@ -34,7 +34,7 @@ INSTALL_DATA = @INSTALL_DATA@ SOURCES = ans.m bincoeff.m bug_report.m bunzip2.m cast.m comma.m \ - compare_versions.m computer.m copyfile.m \ + compare_versions.m computer.m copyfile.m debug.m \ delete.m dir.m doc.m dos.m dump_prefs.m edit.m \ fileattrib.m fileparts.m flops.m fullfile.m getfield.m gunzip.m gzip.m \ info.m inputname.m ismac.m ispc.m isunix.m license.m list_primes.m ls.m \
new file mode 100644 --- /dev/null +++ b/scripts/miscellaneous/debug.m @@ -0,0 +1,83 @@ +## Copyright (C) 2008 David Bateman +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Function File} {} debug () +## Summary of the debugging commands. The debugging commands that are +## available in Octave are +## +## @table @code +## @item keyboard +## Force entry into debug mode. +## +## @item dbstop +## Add a breakpoint. +## +## @item dbclear +## Remove a breakpoint. +## +## @item dbstatus +## List all breakpoints. +## +## @item dbcont +## Continue execution from the debug prompt. +## +## @item dbstack +## Print a backtrace of the execution stack. +## +## @item dbstep +## Execute one or more lines and re-enter debug mode +## +## @item dbtype +## List the function where execution is currently stopped, enumerating +## the lines. +## +## @item dbup +## The workspace up the execution stack. +## +## @item dbdown +## The workspace down the execution stack. +## +## @item dbquit +## Quit debugging mode and return to the main prompt. +## +## @item debug_on_error +## Flag whether to enter debug mode in case Octave encounters an error. +## +## @item debug_on_warning +## Flag whether to enter debug mode in case Octave encounters a warning. +## +## @item debug_on_interrupt +## Flag whether to enter debug mode in case Octave encounters an interupt. +## +## @end table +## +## @noindent +## when Octave encounters a breakpoint or other reason to enter debug +## mode, the prompt changes to @code{"debug>"}. The workspace of the function +## where the breakpoint was encountered becomes available and any Octave +## command that works within that workspace may be executed. +## +## @seealso{dbstop, dbclear, dbstatus, dbcont, dbstack, dbstep, dbtype, +## dbup, dbdown, dbquit, debug_on_error, debug_on_warning, +## debug_on_interrupt} +## @end deftypefn + +function debug () + help ("debug"); +endfunction