]> Creatis software - CreaPhase.git/blob - octave_packages/m/miscellaneous/debug.m
update packages
[CreaPhase.git] / octave_packages / m / miscellaneous / debug.m
1 ## Copyright (C) 2008-2012 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 debugging commands.  For more information on each command
22 ## and available options use @code{help CMD}.
23 ## 
24 ## The debugging commands available in Octave are
25 ##
26 ## @table @code
27 ## @item dbstop
28 ## Add a breakpoint.
29 ##
30 ## @item dbclear
31 ## Remove a breakpoint.
32 ##
33 ## @item dbstatus
34 ## List all breakpoints.
35 ##
36 ## @item dbwhere
37 ## Report the current file and line number where execution is stopped.
38 ##
39 ## @item dbtype
40 ## List the function where execution is currently stopped, enumerating
41 ## the line numbers.
42 ##
43 ## @item  dbstep
44 ## @itemx dbnext
45 ## Execute (step) one or more lines, follow execution into (step into) a
46 ## function call, or execute until the end of a function (step out), and
47 ## re-enter debug mode.
48 ##
49 ## @item dbcont
50 ## Continue normal code execution from the debug prompt.
51 ##
52 ## @item dbquit
53 ## Quit debugging mode immediately and return to the main prompt.
54 ##
55 ## @item dbstack
56 ## Print a backtrace of the execution stack.
57 ##
58 ## @item dbup
59 ## Move up the execution stack.
60 ##
61 ## @item dbdown
62 ## Move down the execution stack.
63 ##
64 ## @item keyboard
65 ## Force entry into debug mode from an m-file.
66 ##
67 ## @item debug_on_error
68 ## Configure whether Octave enters debug mode when it encounters an error.
69 ##
70 ## @item debug_on_warning
71 ## Configure whether Octave enters debug mode when it encounters a warning.
72 ##
73 ## @item debug_on_interrupt
74 ## Configure whether Octave enters debug mode when it encounters an interrupt.
75 ##
76 ## @item isdebugmode
77 ## Return true if in debug mode.
78 ## @end table
79 ##
80 ## @noindent
81 ## When Octave encounters a breakpoint, or other reason to enter debug
82 ## mode, the prompt changes to @code{"debug>"}.  The workspace of the function
83 ## where the breakpoint was encountered becomes available and any Octave
84 ## command that is valid in that workspace context may be executed.
85 ##
86 ## @seealso{dbstop, dbclear, dbstatus, dbwhere, dbtype, dbcont, dbquit,
87 ##          dbstack, dbup, dbdown, keyboard, debug_on_error, debug_on_warning,
88 ##          debug_on_interrupt, isdebugmode}
89 ## @end deftypefn
90
91 function debug ()
92   help ("debug");
93 endfunction