annotate scripts/miscellaneous/debug.m @ 14050:472a25155d82 stable

doc: Clarify documentation on debug commands (Bug #34712) * debug.m: Clarify documentation on debug commands (Bug #34712)
author Rik <octave@nomad.inbox5.com>
date Wed, 14 Dec 2011 11:57:55 -0800
parents 922bfdd80413
children 4f7bbf1c6fe4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 9245
diff changeset
1 ## Copyright (C) 2008-2011 David Bateman
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
2 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
3 ## This file is part of Octave.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
4 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
8 ## your option) any later version.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
9 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
13 ## General Public License for more details.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
14 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
18
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
19 ## -*- texinfo -*-
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
20 ## @deftypefn {Function File} {} debug ()
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
21 ## Summary of debugging commands. For more information on each command
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
22 ## and available options use @code{help CMD}.
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
23 ##
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
24 ## The debugging commands available in Octave are
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
25 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
26 ## @table @code
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
27 ## @item dbstop
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
28 ## Add a breakpoint.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
29 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
30 ## @item dbclear
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
31 ## Remove a breakpoint.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
32 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
33 ## @item dbstatus
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
34 ## List all breakpoints.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
35 ##
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
36 ## @item dbwhere
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
37 ## Report the current file and line number where execution is stopped.
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
38 ##
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
39 ## @item dbtype
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
40 ## List the function where execution is currently stopped, enumerating
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
41 ## the line numbers.
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
42 ##
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
43 ## @item dbstep
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
44 ## @itemx dbnext
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
45 ## Execute one or more lines of code and re-enter debug mode.
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
46 ##
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
47 ## @item dbcont
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
48 ## Continue normal code execution from the debug prompt.
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
49 ##
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
50 ## @item dbquit
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
51 ## Quit debugging mode immediately and return to the main prompt.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
52 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
53 ## @item dbstack
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
54 ## Print a backtrace of the execution stack.
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
55 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
56 ## @item dbup
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
57 ## Move up the execution stack.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
58 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
59 ## @item dbdown
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
60 ## Move down the execution stack.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
61 ##
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
62 ## @item keyboard
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
63 ## Force entry into debug mode from an m-file.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
64 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
65 ## @item debug_on_error
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
66 ## Configure whether Octave enters debug mode when it encounters an error.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
67 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
68 ## @item debug_on_warning
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
69 ## Configure whether Octave enters debug mode when it encounters a warning.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
70 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
71 ## @item debug_on_interrupt
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
72 ## Configure whether Octave enters debug mode when it encounters an interrupt.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
73 ##
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
74 ## @item isdebugmode
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
75 ## Return true if in debug mode.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
76 ## @end table
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
77 ##
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
78 ## @noindent
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
79 ## When Octave encounters a breakpoint, or other reason to enter debug
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 7817
diff changeset
80 ## mode, the prompt changes to @code{"debug>"}. The workspace of the function
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
81 ## where the breakpoint was encountered becomes available and any Octave
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
82 ## command that is valid in that workspace context may be executed.
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
83 ##
14050
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
84 ## @seealso{dbstop, dbclear, dbstatus, dbwhere, dbtype, dbcont, dbquit,
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
85 ## dbstack, dbup, dbdown, keyboard, debug_on_error, debug_on_warning,
472a25155d82 doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents: 13867
diff changeset
86 ## debug_on_interrupt, isdebugmode}
7817
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
87 ## @end deftypefn
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
88
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
89 function debug ()
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
90 help ("debug");
31fb919ba0c0 Add the debug function
David Bateman <dbateman@free.fr>
parents:
diff changeset
91 endfunction