This file is indexed.

/usr/share/qt5/doc/qtscripttools/qscriptenginedebugger.html is in qtscript5-doc-html 5.2.1+dfsg-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qscriptenginedebugger.cpp -->
  <title>QScriptEngineDebugger Class | QtScriptTools </title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.2</li>
<li><a href="qtscripttools-index.html">Qt Script Tools</a></li>
<li><a href="qtscripttools-module.html">C++ Classes</a></li>
<li>QScriptEngineDebugger</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QScriptEngineDebugger Class</h1>
<!-- $$$QScriptEngineDebugger-brief -->
<p>The QScriptEngineDebugger class provides a QScriptEngine debugger. <a href="#details">More...</a></p>
<!-- @@@QScriptEngineDebugger -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include &lt;QScriptEngineDebugger&gt;</span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += scripttools</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.5</td></tr></table><ul>
<li><a href="qscriptenginedebugger-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#DebuggerAction-enum">DebuggerAction</a></b> { InterruptAction, ContinueAction, StepIntoAction, StepOverAction, ..., GoToLineAction }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#DebuggerState-enum">DebuggerState</a></b> { RunningState, SuspendedState }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#DebuggerWidget-enum">DebuggerWidget</a></b> { ConsoleWidget, StackWidget, ScriptsWidget, LocalsWidget, ..., ErrorLogWidget }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#QScriptEngineDebugger">QScriptEngineDebugger</a></b>(QObject *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#dtor.QScriptEngineDebugger">~QScriptEngineDebugger</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction * </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#action">action</a></b>(DebuggerAction<i> action</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#attachTo">attachTo</a></b>(QScriptEngine *<i> engine</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#autoShowStandardWindow">autoShowStandardWindow</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenu * </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#createStandardMenu">createStandardMenu</a></b>(QWidget *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QToolBar * </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#createStandardToolBar">createStandardToolBar</a></b>(QWidget *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#detach">detach</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#setAutoShowStandardWindow">setAutoShowStandardWindow</a></b>(bool<i> autoShow</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMainWindow * </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#standardWindow">standardWindow</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> DebuggerState </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#state">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#widget">widget</a></b>(DebuggerWidget<i> widget</i>) const</td></tr>
</table>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#evaluationResumed">evaluationResumed</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qscriptenginedebugger.html#evaluationSuspended">evaluationSuspended</a></b>()</td></tr>
</table>
<a name="details"></a>
<!-- $$$QScriptEngineDebugger-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QScriptEngineDebugger class provides a QScriptEngine debugger.</p>
<p>The QScriptEngineDebugger class provides a debugger that can be embedded into Qt applications that use Qt Script. The debugger enables the application user to inspect the state of the script environment and control script execution.</p>
<p>To attach the debugger to a script engine, call the <a href="qscriptenginedebugger.html#attachTo">attachTo</a>() function.</p>
<pre class="cpp">    <span class="type">QScriptEngine</span> engine;
    <span class="type">QScriptEngineDebugger</span> debugger;
    debugger<span class="operator">.</span><a href="qscriptenginedebugger.html#attachTo">attachTo</a>(<span class="operator">&amp;</span>engine);</pre>
<p>Once the debugger has been attached to a script engine, you can proceed to evaluate scripts as usual, e.g&#x2e; by calling QScriptEngine::evaluate(). The debugger will be triggered when an uncaught exception occurs, or when a <tt>debugger</tt> statement is encountered in a script. It is also possible to interrupt script evaluation at an arbitrary time by triggering the <a href="qscriptenginedebugger.html#DebuggerAction-enum">InterruptAction</a>. For instance, to start the debugger when script evaluation starts, you trigger the action before you begin to evaluate() the script.</p>
<pre class="cpp">     debugger<span class="operator">-</span><span class="operator">&gt;</span>action(<span class="type">QScriptEngineDebugger</span><span class="operator">::</span>InterruptAction)<span class="operator">-</span><span class="operator">&gt;</span>trigger();
     engine<span class="operator">-</span><span class="operator">&gt;</span>evaluate(contents<span class="operator">,</span> fileName);</pre>
<p>By default, the <a href="qscriptenginedebugger.html#standardWindow">standard debugger window</a> is shown when evaluation is suspended. This can be changed by calling the <a href="qscriptenginedebugger.html#setAutoShowStandardWindow">setAutoShowStandardWindow</a>() function.</p>
<p>The debugger defines a set of <a href="qscriptenginedebugger.html#DebuggerAction-enum">actions</a> that are available, such as stopping execution or printing the contents of a variable. It also provides a set of widgets (components) that display the information available from the debugger and that trigger the actions on request. The actions available are identified by the <a href="qscriptenginedebugger.html#DebuggerAction-enum">DebuggerAction</a> enum, and the widgets are identified by the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">DebuggerWidget</a> enum.</p>
<p>Access to the individual debugger widgets is provided by the <a href="qscriptenginedebugger.html#widget">widget</a>() function. This makes it possible to arrange the widgets in a custom manner. Similarly, the <a href="qscriptenginedebugger.html#action">action</a>() function provides access to the various debugger actions.</p>
<p>The <a href="qscriptenginedebugger.html#createStandardToolBar">createStandardToolBar</a>() function creates a standard toolbar, and the <a href="qscriptenginedebugger.html#createStandardMenu">createStandardMenu</a>() function creates a standard menu; these functions can be useful if you are creating a custom debugger configuration.</p>
<p>The <a href="qscriptenginedebugger.html#evaluationSuspended">evaluationSuspended</a>() signal is emitted when the debugger has suspended script evaluation and entered interactive mode, i.e&#x2e;, the mode in which it accepts input from the user. The <a href="qscriptenginedebugger.html#evaluationResumed">evaluationResumed</a>() signal is emitted when script evaluation is resumed, i.e, when execution control is given back to the script engine. The <a href="qscriptenginedebugger.html#state">state</a>() function returns the debugger's current state.</p>
<p>When calling QScriptEngine::evaluate() it is useful to pass a descriptive script name (file name) as second argument, as this is the name that will be displayed by the debugger in the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">ScriptsWidget</a>; if a name is not passed, the script will be labelled &quot;anonymous&quot;.</p>
<p>When evaluation is suspended, the debugger will also suspend the event loop of the script. In the following snippet, the call to QScriptEngine::evaluate() causes the debugger to be triggered, and the function call does not return until the user has finished interacting with the debugger.</p>
<pre class="cpp">    engine<span class="operator">.</span>evaluate(<span class="string">&quot;debugger&quot;</span>);</pre>
<p>When the Qt Script debugger is running, the C++ application itself is not &quot;frozen&quot;. This means that it is possible that more scripts are evaluated, even though the debugger has suspended evaluation of the <b>current</b> script evaluation. For example, a C++ timer might trigger that causes a script function to be called, or the user might click on a button in the main application user interface whose clicked() signal is connected to a script function. This kind of nested evaluation is permitted. The debugger will enter interactive mode for the new script if an exception is thrown or a breakpoint is reached. Note that it will not stop when encountering <tt>debugger</tt> statements.</p>
<p>Nested evaluation requires some thought when deciding how the debugger is presented to the user; for example, whether a modal dialog is suitable, or whether some parts of the main application user interface should be disabled while the debugger is running.</p>
<p>Debugging inside of a paintEvent() is currently not supported. If you need to debug painting-related script code, that code should be evaluated outside of the C++ paintEvent(), e.g&#x2e; by rendering to an image, like the Context2D and Tetrix Qt Script examples do. This will make the code safe for debugging.</p>
<p>The debugger adds some special properties to the script engine: <tt>__FILE__</tt> holds the name of the script in which the current evaluation occurs, and <tt>__LINE__</tt> holds the current line number. These are useful when doing print()-style debugging (the messages appear in the debugger's debug output widget).</p>
<p>The Qt Script Debugger Manual describes how to use the debugger. The Context2D example shows how to integrate the debugger in applications.</p>
</div>
<p><b>See also </b>QScriptEngine and Context2D Example.</p>
<!-- @@@QScriptEngineDebugger -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$DebuggerAction$$$InterruptAction$$$ContinueAction$$$StepIntoAction$$$StepOverAction$$$StepOutAction$$$RunToCursorAction$$$RunToNewScriptAction$$$ToggleBreakpointAction$$$ClearDebugOutputAction$$$ClearErrorLogAction$$$ClearConsoleAction$$$FindInScriptAction$$$FindNextInScriptAction$$$FindPreviousInScriptAction$$$GoToLineAction -->
<h3 class="fn"><a name="DebuggerAction-enum"></a>enum QScriptEngineDebugger::<span class="name">DebuggerAction</span></h3>
<p>This enum specifies the action that the <a href="qscriptenginedebugger.html#action">action</a>() function should retrieve. The actions retrieved can be connected to any slot and connected to any widget. Please see the Qt Script Debugger Manual's Console Command Reference for a detailed description of these actions.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::InterruptAction</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Suspends script execution as soon as the next script statement is reached.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ContinueAction</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Gives the execution control back to the script engine.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::StepIntoAction</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Performs a step action.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::StepOverAction</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Performs a next action.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::StepOutAction</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Executes the script until the current function returns.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::RunToCursorAction</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Continues execution to the selected line (which contains the cursor) in the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">CodeWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::RunToNewScriptAction</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">Returns control to the script engine until a new script is executed.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ToggleBreakpointAction</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">Toggles a breakpoint at the selected line in the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">CodeWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ClearDebugOutputAction</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Clears the contents of the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">DebugOutputWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ClearErrorLogAction</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">Clears the contents of the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">ErrorLogWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ClearConsoleAction</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign">Clears the contents of the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">ConsoleWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::FindInScriptAction</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign">Displays the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">CodeFinderWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::FindNextInScriptAction</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign">Finds next occurrence in the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">CodeWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::FindPreviousInScriptAction</tt></td><td class="topAlign"><tt>13</tt></td><td class="topAlign">Finds previous occurrence in the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">CodeWidget</a>.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::GoToLineAction</tt></td><td class="topAlign"><tt>14</tt></td><td class="topAlign">Shows the &quot;Go to Line&quot; dialog.</td></tr>
</table>
<!-- @@@DebuggerAction -->
<!-- $$$DebuggerState$$$RunningState$$$SuspendedState -->
<h3 class="fn"><a name="DebuggerState-enum"></a>enum QScriptEngineDebugger::<span class="name">DebuggerState</span></h3>
<p>This enum specifies the current state of the debugger.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::RunningState</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The debugger is running. (Script evaluation is allowed.)</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::SuspendedState</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The debugger has suspended script evaluation.</td></tr>
</table>
<p>This enum was introduced or modified in  Qt 4.6.</p>
<!-- @@@DebuggerState -->
<!-- $$$DebuggerWidget$$$ConsoleWidget$$$StackWidget$$$ScriptsWidget$$$LocalsWidget$$$CodeWidget$$$CodeFinderWidget$$$BreakpointsWidget$$$DebugOutputWidget$$$ErrorLogWidget -->
<h3 class="fn"><a name="DebuggerWidget-enum"></a>enum QScriptEngineDebugger::<span class="name">DebuggerWidget</span></h3>
<p>This enum decides the widget that the <a href="qscriptenginedebugger.html#widget">widget</a>() function should retrieve. We treat these widgets in more detail in the Qt Script Debugger Manual.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ConsoleWidget</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Provides a command-line interface to the debugger.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::StackWidget</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Shows a backtrace of the script's execution state.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ScriptsWidget</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Displays a list of currently loaded scripts.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::LocalsWidget</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Shows the local variables of the current stack frame.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::CodeWidget</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Displays the code of the current script.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::CodeFinderWidget</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Provides a widget that can search for text in the script shown in the CodeWidget.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::BreakpointsWidget</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">Shows breakpoints that have been set.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::DebugOutputWidget</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">Contains output from the <tt>print()</tt> script function.</td></tr>
<tr><td class="topAlign"><tt>QScriptEngineDebugger::ErrorLogWidget</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Shows error messages that have been generated.</td></tr>
</table>
<!-- @@@DebuggerWidget -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QScriptEngineDebugger[overload1]$$$QScriptEngineDebuggerQObject* -->
<h3 class="fn"><a name="QScriptEngineDebugger"></a>QScriptEngineDebugger::<span class="name">QScriptEngineDebugger</span>(<span class="type">QObject</span> *<i> parent</i> = 0)</h3>
<p>Constructs a new <a href="qscriptenginedebugger.html">QScriptEngineDebugger</a> object with the given <i>parent</i>.</p>
<p>To attach a QScriptEngine to the debugger, use <a href="qscriptenginedebugger.html#attachTo">attachTo</a>() function.</p>
<!-- @@@QScriptEngineDebugger -->
<!-- $$$~QScriptEngineDebugger[overload1]$$$~QScriptEngineDebugger -->
<h3 class="fn"><a name="dtor.QScriptEngineDebugger"></a>QScriptEngineDebugger::<span class="name">~QScriptEngineDebugger</span>()</h3>
<p>Destroys this <a href="qscriptenginedebugger.html">QScriptEngineDebugger</a>.</p>
<!-- @@@~QScriptEngineDebugger -->
<!-- $$$action[overload1]$$$actionDebuggerAction -->
<h3 class="fn"><a name="action"></a><span class="type">QAction</span> * QScriptEngineDebugger::<span class="name">action</span>(<span class="type"><a href="qscriptenginedebugger.html#DebuggerAction-enum">DebuggerAction</a></span><i> action</i>) const</h3>
<p>Returns a pointer to the specified <i>action</i>. The actions available are given by the <a href="qscriptenginedebugger.html#DebuggerAction-enum">DebuggerAction</a> enum.</p>
<p>With this function, you can add the actions to your own widgets, toolbars, and menus. It is also convenient if you, for example, wish to spice things up with your own groovy icons. The code example below shows how to add actions to a QToolBar.</p>
<pre class="cpp">    <span class="type">QAction</span> <span class="operator">*</span>continueAction <span class="operator">=</span> debugger<span class="operator">-</span><span class="operator">&gt;</span>action(<span class="type"><a href="qscriptenginedebugger.html">QScriptEngineDebugger</a></span><span class="operator">::</span>ContinueAction);
    <span class="type">QAction</span> <span class="operator">*</span>stepOverAction <span class="operator">=</span> debugger<span class="operator">-</span><span class="operator">&gt;</span>action(<span class="type"><a href="qscriptenginedebugger.html">QScriptEngineDebugger</a></span><span class="operator">::</span>StepOverAction);
    <span class="type">QAction</span> <span class="operator">*</span>stepIntoAction <span class="operator">=</span> debugger<span class="operator">-</span><span class="operator">&gt;</span>action(<span class="type"><a href="qscriptenginedebugger.html">QScriptEngineDebugger</a></span><span class="operator">::</span>StepIntoAction);

    <span class="type">QToolBar</span> <span class="operator">*</span>toolBar <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QToolBar</span>;
    toolBar<span class="operator">-</span><span class="operator">&gt;</span>addAction(continueAction);</pre>
<p>Note that <a href="qscriptenginedebugger.html">QScriptEngineDebugger</a> has already added the actions to its <a href="qscriptenginedebugger.html#DebuggerWidget-enum">standard widgets</a> and <a href="qscriptenginedebugger.html#standardWindow">standard window</a>.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#widget">widget</a>(), <a href="qscriptenginedebugger.html#createStandardMenu">createStandardMenu</a>(), <a href="qscriptenginedebugger.html#createStandardToolBar">createStandardToolBar</a>(), and <a href="qscriptenginedebugger.html#standardWindow">standardWindow</a>().</p>
<!-- @@@action -->
<!-- $$$attachTo[overload1]$$$attachToQScriptEngine* -->
<h3 class="fn"><a name="attachTo"></a><span class="type">void</span> QScriptEngineDebugger::<span class="name">attachTo</span>(<span class="type">QScriptEngine</span> *<i> engine</i>)</h3>
<p>Attaches to the given <i>engine</i>.</p>
<p>The debugger will install a custom agent (using QScriptEngine::setAgent()) to monitor the engine. While the debugger is attached, you should not change the agent; however, if you do have to perform additional monitoring, you must set a proxy agent that forwards all events to the debugger's agent.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#detach">detach</a>().</p>
<!-- @@@attachTo -->
<!-- $$$autoShowStandardWindow[overload1]$$$autoShowStandardWindow -->
<h3 class="fn"><a name="autoShowStandardWindow"></a><span class="type">bool</span> QScriptEngineDebugger::<span class="name">autoShowStandardWindow</span>() const</h3>
<p>Returns whether the standard debugger window is automatically shown when evaluation is suspended.</p>
<p>The default is true.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#setAutoShowStandardWindow">setAutoShowStandardWindow</a>().</p>
<!-- @@@autoShowStandardWindow -->
<!-- $$$createStandardMenu[overload1]$$$createStandardMenuQWidget* -->
<h3 class="fn"><a name="createStandardMenu"></a><span class="type">QMenu</span> * QScriptEngineDebugger::<span class="name">createStandardMenu</span>(<span class="type">QWidget</span> *<i> parent</i> = 0)</h3>
<p>Creates a standard debugger menu with the given <i>parent</i>. Returns the new menu object.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#createStandardToolBar">createStandardToolBar</a>().</p>
<!-- @@@createStandardMenu -->
<!-- $$$createStandardToolBar[overload1]$$$createStandardToolBarQWidget* -->
<h3 class="fn"><a name="createStandardToolBar"></a><span class="type">QToolBar</span> * QScriptEngineDebugger::<span class="name">createStandardToolBar</span>(<span class="type">QWidget</span> *<i> parent</i> = 0)</h3>
<p>Creates a standard debugger toolbar with the given <i>parent</i>. Returns the new toolbar object.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#createStandardMenu">createStandardMenu</a>().</p>
<!-- @@@createStandardToolBar -->
<!-- $$$detach[overload1]$$$detach -->
<h3 class="fn"><a name="detach"></a><span class="type">void</span> QScriptEngineDebugger::<span class="name">detach</span>()</h3>
<p>Detaches from the current script engine, if any.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#attachTo">attachTo</a>().</p>
<!-- @@@detach -->
<!-- $$$evaluationResumed[overload1]$$$evaluationResumed -->
<h3 class="fn"><a name="evaluationResumed"></a><span class="type">void</span> QScriptEngineDebugger::<span class="name">evaluationResumed</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted when the debugger has resumed script evaluation (e.g&#x2e; the user gave the &quot;continue&quot; command).</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#evaluationSuspended">evaluationSuspended</a>().</p>
<!-- @@@evaluationResumed -->
<!-- $$$evaluationSuspended[overload1]$$$evaluationSuspended -->
<h3 class="fn"><a name="evaluationSuspended"></a><span class="type">void</span> QScriptEngineDebugger::<span class="name">evaluationSuspended</span>()<tt> [signal]</tt></h3>
<p>This signal is emitted when the debugger has suspended script evaluation for whatever reason (e.g&#x2e; due to an uncaught script exception, or due to a breakpoint being triggered).</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#evaluationResumed">evaluationResumed</a>().</p>
<!-- @@@evaluationSuspended -->
<!-- $$$setAutoShowStandardWindow[overload1]$$$setAutoShowStandardWindowbool -->
<h3 class="fn"><a name="setAutoShowStandardWindow"></a><span class="type">void</span> QScriptEngineDebugger::<span class="name">setAutoShowStandardWindow</span>(<span class="type">bool</span><i> autoShow</i>)</h3>
<p>Sets whether the standard debugger window is automatically shown when evaluation is suspended. If <i>autoShow</i> is true, the window will be automatically shown, otherwise it will not.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#autoShowStandardWindow">autoShowStandardWindow</a>().</p>
<!-- @@@setAutoShowStandardWindow -->
<!-- $$$standardWindow[overload1]$$$standardWindow -->
<h3 class="fn"><a name="standardWindow"></a><span class="type">QMainWindow</span> * QScriptEngineDebugger::<span class="name">standardWindow</span>() const</h3>
<p>Returns a main window with a standard configuration of the debugger's components.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#createStandardMenu">createStandardMenu</a>() and <a href="qscriptenginedebugger.html#createStandardToolBar">createStandardToolBar</a>().</p>
<!-- @@@standardWindow -->
<!-- $$$state[overload1]$$$state -->
<h3 class="fn"><a name="state"></a><span class="type"><a href="qscriptenginedebugger.html#DebuggerState-enum">DebuggerState</a></span> QScriptEngineDebugger::<span class="name">state</span>() const</h3>
<p>Returns the current state of the debugger.</p>
<p>This function was introduced in  Qt 4.6.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#evaluationResumed">evaluationResumed</a>() and <a href="qscriptenginedebugger.html#evaluationSuspended">evaluationSuspended</a>().</p>
<!-- @@@state -->
<!-- $$$widget[overload1]$$$widgetDebuggerWidget -->
<h3 class="fn"><a name="widget"></a><span class="type">QWidget</span> * QScriptEngineDebugger::<span class="name">widget</span>(<span class="type"><a href="qscriptenginedebugger.html#DebuggerWidget-enum">DebuggerWidget</a></span><i> widget</i>) const</h3>
<p>Returns a pointer to the instance of the specified standard <i>widget</i>. The widgets available are defined by the <a href="qscriptenginedebugger.html#DebuggerWidget-enum">DebuggerWidget</a> enum.</p>
<p>A main window containing all widgets is returned by <a href="qscriptenginedebugger.html#standardWindow">standardWindow</a>(). If you do not want to use this window, you can fetch the individual widgets with this function. For instance, the code example below shows how to set up a layout containing a <a href="qscriptenginedebugger.html#DebuggerWidget-enum">code window</a> and a <a href="qscriptenginedebugger.html#DebuggerWidget-enum">stack widget</a>.</p>
<pre class="cpp">    <span class="type">QWidget</span> <span class="operator">*</span>codeWindow <span class="operator">=</span> debugger<span class="operator">-</span><span class="operator">&gt;</span>widget(<span class="type"><a href="qscriptenginedebugger.html">QScriptEngineDebugger</a></span><span class="operator">::</span>CodeWidget);
    <span class="type">QWidget</span> <span class="operator">*</span>stackWidget <span class="operator">=</span> debugger<span class="operator">-</span><span class="operator">&gt;</span>widget(<span class="type"><a href="qscriptenginedebugger.html">QScriptEngineDebugger</a></span><span class="operator">::</span>StackWidget);

    <span class="type">QLayout</span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QHBoxLayout</span>;
    layout<span class="operator">-</span><span class="operator">&gt;</span>addWidget(codeWindow);
    layout<span class="operator">-</span><span class="operator">&gt;</span>addWidget(stackWidget);</pre>
<p>Note that you need to set <a href="qscriptenginedebugger.html#setAutoShowStandardWindow">setAutoShowStandardWindow</a>() to false; if not, the standard window will be shown regardless.</p>
<p><b>See also </b><a href="qscriptenginedebugger.html#action">action</a>(), <a href="qscriptenginedebugger.html#standardWindow">standardWindow</a>(), and <a href="qscriptenginedebugger.html#setAutoShowStandardWindow">setAutoShowStandardWindow</a>().</p>
<!-- @@@widget -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
   subsidiaries. Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>