|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Debugger.DebugViewer</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Debugger.DebugViewer</h1> |
|
23 <p> |
|
24 Module implementing a widget containing various debug related views. |
|
25 </p><p> |
|
26 The views avaliable are: |
|
27 <ul> |
|
28 <li>variables viewer for global variables</li> |
|
29 <li>variables viewer for local variables</li> |
|
30 <li>call trace viewer</li> |
|
31 <li>viewer for breakpoints</li> |
|
32 <li>viewer for watch expressions</li> |
|
33 <li>viewer for exceptions</li> |
|
34 <li>viewer for threads</li> |
|
35 <li>a file browser (optional)</li> |
|
36 <li>an interpreter shell (optional)</li> |
|
37 </ul> |
|
38 </p> |
|
39 <h3>Global Attributes</h3> |
|
40 <table> |
|
41 <tr><td>None</td></tr> |
|
42 </table> |
|
43 <h3>Classes</h3> |
|
44 <table> |
|
45 <tr> |
|
46 <td><a href="#DebugViewer">DebugViewer</a></td> |
|
47 <td>Class implementing a widget conatining various debug related views.</td> |
|
48 </tr> |
|
49 </table> |
|
50 <h3>Functions</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 <hr /><hr /> |
|
55 <a NAME="DebugViewer" ID="DebugViewer"></a> |
|
56 <h2>DebugViewer</h2> |
|
57 <p> |
|
58 Class implementing a widget conatining various debug related views. |
|
59 </p><p> |
|
60 The individual tabs contain the interpreter shell (optional), |
|
61 the filesystem browser (optional), the two variables viewers |
|
62 (global and local), a breakpoint viewer, a watch expression viewer and |
|
63 the exception logger. Additionally a list of all threads is shown. |
|
64 </p><h3>Signals</h3> |
|
65 <dl> |
|
66 <dt>sourceFile(string, int)</dt> |
|
67 <dd> |
|
68 emitted to open a source file at a line |
|
69 </dd> |
|
70 </dl> |
|
71 <h3>Derived from</h3> |
|
72 QWidget |
|
73 <h3>Class Attributes</h3> |
|
74 <table> |
|
75 <tr><td>None</td></tr> |
|
76 </table> |
|
77 <h3>Class Methods</h3> |
|
78 <table> |
|
79 <tr><td>None</td></tr> |
|
80 </table> |
|
81 <h3>Methods</h3> |
|
82 <table> |
|
83 <tr> |
|
84 <td><a href="#DebugViewer.__init__">DebugViewer</a></td> |
|
85 <td>Constructor</td> |
|
86 </tr><tr> |
|
87 <td><a href="#DebugViewer.__callStackFrameSelected">__callStackFrameSelected</a></td> |
|
88 <td>Private slot to handle the selection of a call stack entry of the call stack viewer.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#DebugViewer.__frameSelected">__frameSelected</a></td> |
|
91 <td>Private slot to handle the selection of a new stack frame number.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#DebugViewer.__setGlobalsFilter">__setGlobalsFilter</a></td> |
|
94 <td>Private slot to set the global variable filter.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#DebugViewer.__setLocalsFilter">__setLocalsFilter</a></td> |
|
97 <td>Private slot to set the local variable filter.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#DebugViewer.__showSource">__showSource</a></td> |
|
100 <td>Private slot to handle the source button press to show the selected file.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#DebugViewer.__threadSelected">__threadSelected</a></td> |
|
103 <td>Private slot to handle the selection of a thread in the thread list.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#DebugViewer.clearCallTrace">clearCallTrace</a></td> |
|
106 <td>Public method to clear the recorded call trace.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#DebugViewer.currentWidget">currentWidget</a></td> |
|
109 <td>Public method to get a reference to the current widget.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#DebugViewer.handleClientStack">handleClientStack</a></td> |
|
112 <td>Public slot to show the call stack of the program being debugged.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#DebugViewer.handleDebuggingStarted">handleDebuggingStarted</a></td> |
|
115 <td>Public slot to handle the start of a debugging session.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#DebugViewer.handleRawInput">handleRawInput</a></td> |
|
118 <td>Public slot to handle the switch to the shell in raw input mode.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#DebugViewer.handleResetUI">handleResetUI</a></td> |
|
121 <td>Public method to reset the SBVviewer.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#DebugViewer.initCallStackViewer">initCallStackViewer</a></td> |
|
124 <td>Public method to initialize the call stack viewer.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#DebugViewer.isCallTraceEnabled">isCallTraceEnabled</a></td> |
|
127 <td>Public method to get the state of the call trace function.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#DebugViewer.preferencesChanged">preferencesChanged</a></td> |
|
130 <td>Public slot to handle the preferencesChanged signal.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#DebugViewer.restoreCurrentPage">restoreCurrentPage</a></td> |
|
133 <td>Public slot to restore the previously saved page.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#DebugViewer.saveCurrentPage">saveCurrentPage</a></td> |
|
136 <td>Public slot to save the current page.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#DebugViewer.setCallTraceToProjectMode">setCallTraceToProjectMode</a></td> |
|
139 <td>Public slot to set the call trace viewer to project mode.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#DebugViewer.setCurrentWidget">setCurrentWidget</a></td> |
|
142 <td>Public slot to set the current page based on the given widget.</td> |
|
143 </tr><tr> |
|
144 <td><a href="#DebugViewer.setDebugger">setDebugger</a></td> |
|
145 <td>Public method to set a reference to the Debug UI.</td> |
|
146 </tr><tr> |
|
147 <td><a href="#DebugViewer.setVariablesFilter">setVariablesFilter</a></td> |
|
148 <td>Public slot to set the local variables filter.</td> |
|
149 </tr><tr> |
|
150 <td><a href="#DebugViewer.showThreadList">showThreadList</a></td> |
|
151 <td>Public method to show the thread list.</td> |
|
152 </tr><tr> |
|
153 <td><a href="#DebugViewer.showVariable">showVariable</a></td> |
|
154 <td>Public method to show the variables in the respective window.</td> |
|
155 </tr><tr> |
|
156 <td><a href="#DebugViewer.showVariables">showVariables</a></td> |
|
157 <td>Public method to show the variables in the respective window.</td> |
|
158 </tr><tr> |
|
159 <td><a href="#DebugViewer.showVariablesTab">showVariablesTab</a></td> |
|
160 <td>Public method to make a variables tab visible.</td> |
|
161 </tr> |
|
162 </table> |
|
163 <h3>Static Methods</h3> |
|
164 <table> |
|
165 <tr><td>None</td></tr> |
|
166 </table> |
|
167 <a NAME="DebugViewer.__init__" ID="DebugViewer.__init__"></a> |
|
168 <h4>DebugViewer (Constructor)</h4> |
|
169 <b>DebugViewer</b>(<i>debugServer, docked, vm, parent=None, embeddedShell=True, embeddedBrowser=True</i>) |
|
170 <p> |
|
171 Constructor |
|
172 </p><dl> |
|
173 <dt><i>debugServer</i></dt> |
|
174 <dd> |
|
175 reference to the debug server object |
|
176 </dd><dt><i>docked</i></dt> |
|
177 <dd> |
|
178 flag indicating a dock window |
|
179 </dd><dt><i>vm</i></dt> |
|
180 <dd> |
|
181 reference to the viewmanager object |
|
182 </dd><dt><i>parent</i></dt> |
|
183 <dd> |
|
184 parent widget (QWidget) |
|
185 </dd><dt><i>embeddedShell</i></dt> |
|
186 <dd> |
|
187 flag indicating whether the shell should be |
|
188 included. This flag is set to False by those layouts, that have |
|
189 the interpreter shell in a separate window. |
|
190 </dd><dt><i>embeddedBrowser</i></dt> |
|
191 <dd> |
|
192 flag indicating whether the file browser should |
|
193 be included. This flag is set to False by those layouts, that |
|
194 have the file browser in a separate window or embedded |
|
195 in the project browser instead. |
|
196 </dd> |
|
197 </dl><a NAME="DebugViewer.__callStackFrameSelected" ID="DebugViewer.__callStackFrameSelected"></a> |
|
198 <h4>DebugViewer.__callStackFrameSelected</h4> |
|
199 <b>__callStackFrameSelected</b>(<i>frameNo</i>) |
|
200 <p> |
|
201 Private slot to handle the selection of a call stack entry of the |
|
202 call stack viewer. |
|
203 </p><dl> |
|
204 <dt><i>frameNo</i></dt> |
|
205 <dd> |
|
206 frame number (index) of the selected entry (integer) |
|
207 </dd> |
|
208 </dl><a NAME="DebugViewer.__frameSelected" ID="DebugViewer.__frameSelected"></a> |
|
209 <h4>DebugViewer.__frameSelected</h4> |
|
210 <b>__frameSelected</b>(<i>frmnr</i>) |
|
211 <p> |
|
212 Private slot to handle the selection of a new stack frame number. |
|
213 </p><dl> |
|
214 <dt><i>frmnr</i></dt> |
|
215 <dd> |
|
216 frame number (0 is the current frame) (int) |
|
217 </dd> |
|
218 </dl><a NAME="DebugViewer.__setGlobalsFilter" ID="DebugViewer.__setGlobalsFilter"></a> |
|
219 <h4>DebugViewer.__setGlobalsFilter</h4> |
|
220 <b>__setGlobalsFilter</b>(<i></i>) |
|
221 <p> |
|
222 Private slot to set the global variable filter. |
|
223 </p><a NAME="DebugViewer.__setLocalsFilter" ID="DebugViewer.__setLocalsFilter"></a> |
|
224 <h4>DebugViewer.__setLocalsFilter</h4> |
|
225 <b>__setLocalsFilter</b>(<i></i>) |
|
226 <p> |
|
227 Private slot to set the local variable filter. |
|
228 </p><a NAME="DebugViewer.__showSource" ID="DebugViewer.__showSource"></a> |
|
229 <h4>DebugViewer.__showSource</h4> |
|
230 <b>__showSource</b>(<i></i>) |
|
231 <p> |
|
232 Private slot to handle the source button press to show the selected |
|
233 file. |
|
234 </p><a NAME="DebugViewer.__threadSelected" ID="DebugViewer.__threadSelected"></a> |
|
235 <h4>DebugViewer.__threadSelected</h4> |
|
236 <b>__threadSelected</b>(<i>current, previous</i>) |
|
237 <p> |
|
238 Private slot to handle the selection of a thread in the thread list. |
|
239 </p><dl> |
|
240 <dt><i>current</i></dt> |
|
241 <dd> |
|
242 reference to the new current item (QTreeWidgetItem) |
|
243 </dd><dt><i>previous</i></dt> |
|
244 <dd> |
|
245 reference to the previous current item |
|
246 (QTreeWidgetItem) |
|
247 </dd> |
|
248 </dl><a NAME="DebugViewer.clearCallTrace" ID="DebugViewer.clearCallTrace"></a> |
|
249 <h4>DebugViewer.clearCallTrace</h4> |
|
250 <b>clearCallTrace</b>(<i></i>) |
|
251 <p> |
|
252 Public method to clear the recorded call trace. |
|
253 </p><a NAME="DebugViewer.currentWidget" ID="DebugViewer.currentWidget"></a> |
|
254 <h4>DebugViewer.currentWidget</h4> |
|
255 <b>currentWidget</b>(<i></i>) |
|
256 <p> |
|
257 Public method to get a reference to the current widget. |
|
258 </p><dl> |
|
259 <dt>Returns:</dt> |
|
260 <dd> |
|
261 reference to the current widget (QWidget) |
|
262 </dd> |
|
263 </dl><a NAME="DebugViewer.handleClientStack" ID="DebugViewer.handleClientStack"></a> |
|
264 <h4>DebugViewer.handleClientStack</h4> |
|
265 <b>handleClientStack</b>(<i>stack</i>) |
|
266 <p> |
|
267 Public slot to show the call stack of the program being debugged. |
|
268 </p><dl> |
|
269 <dt><i>stack</i></dt> |
|
270 <dd> |
|
271 list of tuples with call stack data (file name, |
|
272 line number, function name, formatted argument/values list) |
|
273 </dd> |
|
274 </dl><a NAME="DebugViewer.handleDebuggingStarted" ID="DebugViewer.handleDebuggingStarted"></a> |
|
275 <h4>DebugViewer.handleDebuggingStarted</h4> |
|
276 <b>handleDebuggingStarted</b>(<i></i>) |
|
277 <p> |
|
278 Public slot to handle the start of a debugging session. |
|
279 </p><p> |
|
280 This slot sets the variables filter expressions. |
|
281 </p><a NAME="DebugViewer.handleRawInput" ID="DebugViewer.handleRawInput"></a> |
|
282 <h4>DebugViewer.handleRawInput</h4> |
|
283 <b>handleRawInput</b>(<i></i>) |
|
284 <p> |
|
285 Public slot to handle the switch to the shell in raw input mode. |
|
286 </p><a NAME="DebugViewer.handleResetUI" ID="DebugViewer.handleResetUI"></a> |
|
287 <h4>DebugViewer.handleResetUI</h4> |
|
288 <b>handleResetUI</b>(<i></i>) |
|
289 <p> |
|
290 Public method to reset the SBVviewer. |
|
291 </p><a NAME="DebugViewer.initCallStackViewer" ID="DebugViewer.initCallStackViewer"></a> |
|
292 <h4>DebugViewer.initCallStackViewer</h4> |
|
293 <b>initCallStackViewer</b>(<i>projectMode</i>) |
|
294 <p> |
|
295 Public method to initialize the call stack viewer. |
|
296 </p><dl> |
|
297 <dt><i>projectMode</i></dt> |
|
298 <dd> |
|
299 flag indicating to enable the project mode (boolean) |
|
300 </dd> |
|
301 </dl><a NAME="DebugViewer.isCallTraceEnabled" ID="DebugViewer.isCallTraceEnabled"></a> |
|
302 <h4>DebugViewer.isCallTraceEnabled</h4> |
|
303 <b>isCallTraceEnabled</b>(<i></i>) |
|
304 <p> |
|
305 Public method to get the state of the call trace function. |
|
306 </p><dl> |
|
307 <dt>Returns:</dt> |
|
308 <dd> |
|
309 flag indicating the state of the call trace function (boolean) |
|
310 </dd> |
|
311 </dl><a NAME="DebugViewer.preferencesChanged" ID="DebugViewer.preferencesChanged"></a> |
|
312 <h4>DebugViewer.preferencesChanged</h4> |
|
313 <b>preferencesChanged</b>(<i></i>) |
|
314 <p> |
|
315 Public slot to handle the preferencesChanged signal. |
|
316 </p><a NAME="DebugViewer.restoreCurrentPage" ID="DebugViewer.restoreCurrentPage"></a> |
|
317 <h4>DebugViewer.restoreCurrentPage</h4> |
|
318 <b>restoreCurrentPage</b>(<i></i>) |
|
319 <p> |
|
320 Public slot to restore the previously saved page. |
|
321 </p><a NAME="DebugViewer.saveCurrentPage" ID="DebugViewer.saveCurrentPage"></a> |
|
322 <h4>DebugViewer.saveCurrentPage</h4> |
|
323 <b>saveCurrentPage</b>(<i></i>) |
|
324 <p> |
|
325 Public slot to save the current page. |
|
326 </p><a NAME="DebugViewer.setCallTraceToProjectMode" ID="DebugViewer.setCallTraceToProjectMode"></a> |
|
327 <h4>DebugViewer.setCallTraceToProjectMode</h4> |
|
328 <b>setCallTraceToProjectMode</b>(<i>enabled</i>) |
|
329 <p> |
|
330 Public slot to set the call trace viewer to project mode. |
|
331 </p><p> |
|
332 In project mode the call trace info is shown with project relative |
|
333 path names. |
|
334 </p><dl> |
|
335 <dt><i>enabled</i></dt> |
|
336 <dd> |
|
337 flag indicating to enable the project mode (boolean) |
|
338 </dd> |
|
339 </dl><a NAME="DebugViewer.setCurrentWidget" ID="DebugViewer.setCurrentWidget"></a> |
|
340 <h4>DebugViewer.setCurrentWidget</h4> |
|
341 <b>setCurrentWidget</b>(<i>widget</i>) |
|
342 <p> |
|
343 Public slot to set the current page based on the given widget. |
|
344 </p><dl> |
|
345 <dt><i>widget</i></dt> |
|
346 <dd> |
|
347 reference to the widget (QWidget) |
|
348 </dd> |
|
349 </dl><a NAME="DebugViewer.setDebugger" ID="DebugViewer.setDebugger"></a> |
|
350 <h4>DebugViewer.setDebugger</h4> |
|
351 <b>setDebugger</b>(<i>debugUI</i>) |
|
352 <p> |
|
353 Public method to set a reference to the Debug UI. |
|
354 </p><dl> |
|
355 <dt><i>debugUI</i></dt> |
|
356 <dd> |
|
357 reference to the DebugUI object (DebugUI) |
|
358 </dd> |
|
359 </dl><a NAME="DebugViewer.setVariablesFilter" ID="DebugViewer.setVariablesFilter"></a> |
|
360 <h4>DebugViewer.setVariablesFilter</h4> |
|
361 <b>setVariablesFilter</b>(<i>globalsFilter, localsFilter</i>) |
|
362 <p> |
|
363 Public slot to set the local variables filter. |
|
364 </p><dl> |
|
365 <dt><i>globalsFilter</i></dt> |
|
366 <dd> |
|
367 filter list for global variable types |
|
368 (list of int) |
|
369 </dd><dt><i>localsFilter</i></dt> |
|
370 <dd> |
|
371 filter list for local variable types (list of int) |
|
372 </dd> |
|
373 </dl><a NAME="DebugViewer.showThreadList" ID="DebugViewer.showThreadList"></a> |
|
374 <h4>DebugViewer.showThreadList</h4> |
|
375 <b>showThreadList</b>(<i>currentID, threadList</i>) |
|
376 <p> |
|
377 Public method to show the thread list. |
|
378 </p><dl> |
|
379 <dt><i>currentID</i></dt> |
|
380 <dd> |
|
381 id of the current thread (integer) |
|
382 </dd><dt><i>threadList</i></dt> |
|
383 <dd> |
|
384 list of dictionaries containing the thread data |
|
385 </dd> |
|
386 </dl><a NAME="DebugViewer.showVariable" ID="DebugViewer.showVariable"></a> |
|
387 <h4>DebugViewer.showVariable</h4> |
|
388 <b>showVariable</b>(<i>vlist, globals</i>) |
|
389 <p> |
|
390 Public method to show the variables in the respective window. |
|
391 </p><dl> |
|
392 <dt><i>vlist</i></dt> |
|
393 <dd> |
|
394 list of variables to display |
|
395 </dd><dt><i>globals</i></dt> |
|
396 <dd> |
|
397 flag indicating global/local state |
|
398 </dd> |
|
399 </dl><a NAME="DebugViewer.showVariables" ID="DebugViewer.showVariables"></a> |
|
400 <h4>DebugViewer.showVariables</h4> |
|
401 <b>showVariables</b>(<i>vlist, globals</i>) |
|
402 <p> |
|
403 Public method to show the variables in the respective window. |
|
404 </p><dl> |
|
405 <dt><i>vlist</i></dt> |
|
406 <dd> |
|
407 list of variables to display |
|
408 </dd><dt><i>globals</i></dt> |
|
409 <dd> |
|
410 flag indicating global/local state |
|
411 </dd> |
|
412 </dl><a NAME="DebugViewer.showVariablesTab" ID="DebugViewer.showVariablesTab"></a> |
|
413 <h4>DebugViewer.showVariablesTab</h4> |
|
414 <b>showVariablesTab</b>(<i>globals</i>) |
|
415 <p> |
|
416 Public method to make a variables tab visible. |
|
417 </p><dl> |
|
418 <dt><i>globals</i></dt> |
|
419 <dd> |
|
420 flag indicating global/local state |
|
421 </dd> |
|
422 </dl> |
|
423 <div align="right"><a href="#top">Up</a></div> |
|
424 <hr /> |
|
425 </body></html> |