Mercurial > octave
annotate scripts/help/debug.m @ 27919:1891570abac8
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2020.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Jan 2020 22:29:51 -0500 |
parents | b442ec6dda5c |
children | bd51beb6205e |
rev | line source |
---|---|
27919
1891570abac8
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27918
diff
changeset
|
1 ## Copyright (C) 2008-2020 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
2 ## |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
3 ## See the file COPYRIGHT.md in the top-level directory of this distribution |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
4 ## or <https://octave.org/COPYRIGHT.html/>. |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
5 ## |
7817 | 6 ## |
7 ## This file is part of Octave. | |
8 ## | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24486
diff
changeset
|
9 ## Octave is free software: you can redistribute it and/or modify it |
7817 | 10 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24486
diff
changeset
|
11 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
12 ## (at your option) any later version. |
7817 | 13 ## |
14 ## Octave is distributed in the hope that it will be useful, but | |
15 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
17 ## GNU General Public License for more details. |
7817 | 18 ## |
19 ## You should have received a copy of the GNU General Public License | |
20 ## along with Octave; see the file COPYING. If not, see | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
24486
diff
changeset
|
21 ## <https://www.gnu.org/licenses/>. |
7817 | 22 |
23 ## -*- texinfo -*- | |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20164
diff
changeset
|
24 ## @deftypefn {} {} debug () |
19177
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18372
diff
changeset
|
25 ## Summary of debugging commands. |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18372
diff
changeset
|
26 ## |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18372
diff
changeset
|
27 ## 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:
18372
diff
changeset
|
28 ## @code{help CMD}. |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
18372
diff
changeset
|
29 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
30 ## The debugging commands available in Octave are |
7817 | 31 ## |
32 ## @table @code | |
33 ## @item dbstop | |
34 ## Add a breakpoint. | |
35 ## | |
36 ## @item dbclear | |
37 ## Remove a breakpoint. | |
38 ## | |
39 ## @item dbstatus | |
40 ## List all breakpoints. | |
41 ## | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
42 ## @item dbwhere |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
43 ## 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
|
44 ## |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
45 ## @item dbtype |
18372
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
46 ## 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
|
47 ## the line numbers. |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
48 ## |
18372
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
49 ## @item dblist |
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
50 ## 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
|
51 ## stopped. |
765520694992
doc: Add dblist to list of commands from 'help debug'.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
52 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
53 ## @item dbstep |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
54 ## @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
|
55 ## 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
|
56 ## 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
|
57 ## re-enter debug mode. |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
58 ## |
7817 | 59 ## @item dbcont |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
60 ## 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
|
61 ## |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
62 ## @item dbquit |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
63 ## Quit debugging mode immediately and return to the main prompt. |
7817 | 64 ## |
65 ## @item dbstack | |
66 ## Print a backtrace of the execution stack. | |
67 ## | |
68 ## @item dbup | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
69 ## Move up the execution stack. |
7817 | 70 ## |
71 ## @item dbdown | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
72 ## Move down the execution stack. |
7817 | 73 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
74 ## @item keyboard |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
75 ## Force entry into debug mode from an m-file. |
7817 | 76 ## |
77 ## @item debug_on_error | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
78 ## Configure whether Octave enters debug mode when it encounters an error. |
7817 | 79 ## |
80 ## @item debug_on_warning | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
81 ## Configure whether Octave enters debug mode when it encounters a warning. |
7817 | 82 ## |
83 ## @item debug_on_interrupt | |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
84 ## 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
|
85 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
86 ## @item isdebugmode |
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
87 ## Return true if in debug mode. |
7817 | 88 ## @end table |
89 ## | |
90 ## @noindent | |
20164
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
91 ## When Octave encounters a breakpoint, or other reason to enter debug mode, |
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
92 ## the prompt changes to @qcode{"debug>"}. The workspace of the function |
7817 | 93 ## 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
|
94 ## command that is valid in that workspace context may be executed. |
7817 | 95 ## |
14050
472a25155d82
doc: Clarify documentation on debug commands (Bug #34712)
Rik <octave@nomad.inbox5.com>
parents:
13867
diff
changeset
|
96 ## @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
|
97 ## 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
|
98 ## debug_on_interrupt, isdebugmode} |
7817 | 99 ## @end deftypefn |
100 | |
101 function debug () | |
102 help ("debug"); | |
103 endfunction | |
17338
1c89599167a6
maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
104 |
19177
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18372
diff
changeset
|
105 |
0aa59fd7e6f1
debug.m: Mark documentation m-file as tested for BIST testing.
Rik <rik@octave.org>
parents:
18372
diff
changeset
|
106 ## 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:
18372
diff
changeset
|
107 %!assert (1) |