Mercurial > hg > octave-nkf
annotate scripts/miscellaneous/debug.m @ 20214:eba80000fa0d rc-4-0-0-2
maint: Bump version number for 4.0.0-rc2.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 Mar 2015 16:19:38 -0400 |
parents | 4197fc428c7d |
children | df437a52bcaf |
rev | line source |
---|---|
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19793
diff
changeset
|
1 ## Copyright (C) 2008-2015 David Bateman |
7817 | 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 () | |
19369
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
21 ## Summary of debugging commands. |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
22 ## |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
23 ## For more information on each command and available options use |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
24 ## @code{help CMD}. |
19790
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
18440
diff
changeset
|
25 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
26 ## The debugging commands available in Octave are |
7817 | 27 ## |
28 ## @table @code | |
29 ## @item dbstop | |
30 ## Add a breakpoint. | |
31 ## | |
32 ## @item dbclear | |
33 ## Remove a breakpoint. | |
34 ## | |
35 ## @item dbstatus | |
36 ## List all breakpoints. | |
37 ## | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
38 ## @item dbwhere |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
39 ## 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
|
40 ## |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
41 ## @item dbtype |
18440
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
42 ## Display the code of the function being debugged, enumerating |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
43 ## the line numbers. |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
44 ## |
18440
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
45 ## @item dblist |
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
46 ## List 10 lines of code centered around the line number where execution is |
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
47 ## stopped. |
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
48 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
49 ## @item dbstep |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
50 ## @itemx dbnext |
14053
4f7bbf1c6fe4
debug.m: Hint more at the capabilities of dbstep (bug #34712)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14050
diff
changeset
|
51 ## Execute (step) one or more lines, follow execution into (step into) a |
4f7bbf1c6fe4
debug.m: Hint more at the capabilities of dbstep (bug #34712)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14050
diff
changeset
|
52 ## function call, or execute until the end of a function (step out), and |
4f7bbf1c6fe4
debug.m: Hint more at the capabilities of dbstep (bug #34712)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14050
diff
changeset
|
53 ## re-enter debug mode. |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
54 ## |
7817 | 55 ## @item dbcont |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
56 ## 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
|
57 ## |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
58 ## @item dbquit |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
59 ## Quit debugging mode immediately and return to the main prompt. |
7817 | 60 ## |
61 ## @item dbstack | |
62 ## Print a backtrace of the execution stack. | |
63 ## | |
64 ## @item dbup | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
65 ## Move up the execution stack. |
7817 | 66 ## |
67 ## @item dbdown | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
68 ## Move down the execution stack. |
7817 | 69 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
70 ## @item keyboard |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
71 ## Force entry into debug mode from an m-file. |
7817 | 72 ## |
73 ## @item debug_on_error | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
74 ## Configure whether Octave enters debug mode when it encounters an error. |
7817 | 75 ## |
76 ## @item debug_on_warning | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
77 ## Configure whether Octave enters debug mode when it encounters a warning. |
7817 | 78 ## |
79 ## @item debug_on_interrupt | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
80 ## 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
|
81 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
82 ## @item isdebugmode |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
83 ## Return true if in debug mode. |
7817 | 84 ## @end table |
85 ## | |
86 ## @noindent | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
87 ## When Octave encounters a breakpoint, or other reason to enter debug |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
88 ## mode, the prompt changes to @qcode{"debug>"}. The workspace of the function |
7817 | 89 ## 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
|
90 ## command that is valid in that workspace context may be executed. |
7817 | 91 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
92 ## @seealso{dbstop, dbclear, dbstatus, dbwhere, dbtype, dbcont, dbquit, |
17341
f4772605aec3
debug.m: Fix spacing in @seealso macro (bug #39871)
Rik <rik@octave.org>
parents:
17338
diff
changeset
|
93 ## dbstack, dbup, dbdown, keyboard, debug_on_error, debug_on_warning, |
f4772605aec3
debug.m: Fix spacing in @seealso macro (bug #39871)
Rik <rik@octave.org>
parents:
17338
diff
changeset
|
94 ## debug_on_interrupt, isdebugmode} |
7817 | 95 ## @end deftypefn |
96 | |
97 function debug () | |
98 help ("debug"); | |
99 endfunction | |
17338
1c89599167a6
maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
100 |
19369
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
101 |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
102 ## Mark file as being tested. No real test needed for a documentation .m file |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
103 %!assert (1) |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18440
diff
changeset
|
104 |