comparison scripts/miscellaneous/debug.m @ 7817:31fb919ba0c0

Add the debug function
author David Bateman <dbateman@free.fr>
date Sun, 25 May 2008 16:32:30 +0200
parents
children 1bf0ce0930be
comparison
equal deleted inserted replaced
7816:ddecf2eb1910 7817:31fb919ba0c0
1 ## Copyright (C) 2008 David Bateman
2 ##
3 ## This file is part of Octave.
4 ##
5 ## Octave is free software; you can redistribute it and/or modify it
6 ## under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 3 of the License, or (at
8 ## your option) any later version.
9 ##
10 ## Octave is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>.
18
19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {} debug ()
21 ## Summary of the debugging commands. The debugging commands that are
22 ## available in Octave are
23 ##
24 ## @table @code
25 ## @item keyboard
26 ## Force entry into debug mode.
27 ##
28 ## @item dbstop
29 ## Add a breakpoint.
30 ##
31 ## @item dbclear
32 ## Remove a breakpoint.
33 ##
34 ## @item dbstatus
35 ## List all breakpoints.
36 ##
37 ## @item dbcont
38 ## Continue execution from the debug prompt.
39 ##
40 ## @item dbstack
41 ## Print a backtrace of the execution stack.
42 ##
43 ## @item dbstep
44 ## Execute one or more lines and re-enter debug mode
45 ##
46 ## @item dbtype
47 ## List the function where execution is currently stopped, enumerating
48 ## the lines.
49 ##
50 ## @item dbup
51 ## The workspace up the execution stack.
52 ##
53 ## @item dbdown
54 ## The workspace down the execution stack.
55 ##
56 ## @item dbquit
57 ## Quit debugging mode and return to the main prompt.
58 ##
59 ## @item debug_on_error
60 ## Flag whether to enter debug mode in case Octave encounters an error.
61 ##
62 ## @item debug_on_warning
63 ## Flag whether to enter debug mode in case Octave encounters a warning.
64 ##
65 ## @item debug_on_interrupt
66 ## Flag whether to enter debug mode in case Octave encounters an interupt.
67 ##
68 ## @end table
69 ##
70 ## @noindent
71 ## when Octave encounters a breakpoint or other reason to enter debug
72 ## mode, the prompt changes to @code{"debug>"}. The workspace of the function
73 ## where the breakpoint was encountered becomes available and any Octave
74 ## command that works within that workspace may be executed.
75 ##
76 ## @seealso{dbstop, dbclear, dbstatus, dbcont, dbstack, dbstep, dbtype,
77 ## dbup, dbdown, dbquit, debug_on_error, debug_on_warning,
78 ## debug_on_interrupt}
79 ## @end deftypefn
80
81 function debug ()
82 help ("debug");
83 endfunction