File: Entering-Debug-Mode.html

package info (click to toggle)
octave 10.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 145,388 kB
  • sloc: cpp: 335,976; ansic: 82,241; fortran: 20,963; objc: 9,402; sh: 8,756; yacc: 4,392; lex: 4,333; perl: 1,544; java: 1,366; awk: 1,259; makefile: 660; xml: 192
file content (121 lines) | stat: -rw-r--r-- 8,374 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Entering Debug Mode (GNU Octave (version 10.3.0))</title>

<meta name="description" content="Entering Debug Mode (GNU Octave (version 10.3.0))">
<meta name="keywords" content="Entering Debug Mode (GNU Octave (version 10.3.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Debugging.html" rel="up" title="Debugging">
<link href="Leaving-Debug-Mode.html" rel="next" title="Leaving Debug Mode">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
kbd.kbd {font-style: oblique}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<div class="section-level-extent" id="Entering-Debug-Mode">
<div class="nav-panel">
<p>
Next: <a href="Leaving-Debug-Mode.html" accesskey="n" rel="next">Leaving Debug Mode</a>, Up: <a href="Debugging.html" accesskey="u" rel="up">Debugging</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="Entering-Debug-Mode-1"><span>13.1 Entering Debug Mode<a class="copiable-link" href="#Entering-Debug-Mode-1"> &para;</a></span></h3>

<p>There are two basic means of interrupting the execution of an Octave
script.  These are breakpoints (see <a class="pxref" href="Breakpoints.html">Breakpoints</a>), discussed in the next
section, and interruption based on some condition.
</p>
<p>Octave supports three means to stop execution based on the values set in
the functions <code class="code">debug_on_interrupt</code>, <code class="code">debug_on_warning</code>, and
<code class="code">debug_on_error</code>.
</p>
<a class="anchor" id="XREFdebug_005fon_005finterrupt"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-debug_005fon_005finterrupt"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">debug_on_interrupt</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-debug_005fon_005finterrupt"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-debug_005fon_005finterrupt-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">debug_on_interrupt</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-debug_005fon_005finterrupt-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-debug_005fon_005finterrupt-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">debug_on_interrupt</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-debug_005fon_005finterrupt-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that controls whether Octave will try
to enter debugging mode when it receives an interrupt signal (typically
generated with <kbd class="kbd">C-c</kbd>).
</p>
<p>If a second interrupt signal is received before reaching the debugging mode,
a normal interrupt will occur.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFdebug_005fon_005ferror">debug_on_error</a>, <a class="ref" href="#XREFdebug_005fon_005fwarning">debug_on_warning</a>.
</p></dd></dl>


<a class="anchor" id="XREFdebug_005fon_005fwarning"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-debug_005fon_005fwarning"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">debug_on_warning</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-debug_005fon_005fwarning"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-debug_005fon_005fwarning-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">debug_on_warning</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-debug_005fon_005fwarning-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-debug_005fon_005fwarning-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">debug_on_warning</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-debug_005fon_005fwarning-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that controls whether Octave will try
to enter the debugger when a warning is encountered.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFdebug_005fon_005ferror">debug_on_error</a>, <a class="ref" href="#XREFdebug_005fon_005finterrupt">debug_on_interrupt</a>.
</p></dd></dl>


<a class="anchor" id="XREFdebug_005fon_005ferror"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-debug_005fon_005ferror"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">debug_on_error</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-debug_005fon_005ferror"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-debug_005fon_005ferror-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">debug_on_error</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-debug_005fon_005ferror-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-debug_005fon_005ferror-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">debug_on_error</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-debug_005fon_005ferror-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that controls whether Octave will try
to enter the debugger when an error is encountered.
</p>
<p>This will also inhibit printing of the normal traceback message (you will
only see the top-level error message).
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFdebug_005fon_005fwarning">debug_on_warning</a>, <a class="ref" href="#XREFdebug_005fon_005finterrupt">debug_on_interrupt</a>.
</p></dd></dl>


</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Leaving-Debug-Mode.html">Leaving Debug Mode</a>, Up: <a href="Debugging.html">Debugging</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>