|
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 containing 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 containing 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.__showSource">__showSource</a></td> |
|
94 <td>Private slot to handle the source button press to show the selected file.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#DebugViewer.__threadSelected">__threadSelected</a></td> |
|
97 <td>Private slot to handle the selection of a thread in the thread list.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#DebugViewer.clearCallTrace">clearCallTrace</a></td> |
|
100 <td>Public method to clear the recorded call trace.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#DebugViewer.currentWidget">currentWidget</a></td> |
|
103 <td>Public method to get a reference to the current widget.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#DebugViewer.handleClientStack">handleClientStack</a></td> |
|
106 <td>Public slot to show the call stack of the program being debugged.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#DebugViewer.handleDebuggingStarted">handleDebuggingStarted</a></td> |
|
109 <td>Public slot to handle the start of a debugging session.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#DebugViewer.handleResetUI">handleResetUI</a></td> |
|
112 <td>Public method to reset the SBVviewer.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#DebugViewer.initCallStackViewer">initCallStackViewer</a></td> |
|
115 <td>Public method to initialize the call stack viewer.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#DebugViewer.isCallTraceEnabled">isCallTraceEnabled</a></td> |
|
118 <td>Public method to get the state of the call trace function.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#DebugViewer.preferencesChanged">preferencesChanged</a></td> |
|
121 <td>Public slot to handle the preferencesChanged signal.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#DebugViewer.setCallTraceToProjectMode">setCallTraceToProjectMode</a></td> |
|
124 <td>Public slot to set the call trace viewer to project mode.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#DebugViewer.setCurrentWidget">setCurrentWidget</a></td> |
|
127 <td>Public slot to set the current page based on the given widget.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#DebugViewer.setDebugger">setDebugger</a></td> |
|
130 <td>Public method to set a reference to the Debug UI.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#DebugViewer.setGlobalsFilter">setGlobalsFilter</a></td> |
|
133 <td>Public slot to set the global variable filter.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#DebugViewer.setLocalsFilter">setLocalsFilter</a></td> |
|
136 <td>Public slot to set the local variable filter.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#DebugViewer.setVariablesFilter">setVariablesFilter</a></td> |
|
139 <td>Public slot to set the local variables filter.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#DebugViewer.showThreadList">showThreadList</a></td> |
|
142 <td>Public method to show the thread list.</td> |
|
143 </tr><tr> |
|
144 <td><a href="#DebugViewer.showVariable">showVariable</a></td> |
|
145 <td>Public method to show the variables in the respective window.</td> |
|
146 </tr><tr> |
|
147 <td><a href="#DebugViewer.showVariables">showVariables</a></td> |
|
148 <td>Public method to show the variables in the respective window.</td> |
|
149 </tr><tr> |
|
150 <td><a href="#DebugViewer.showVariablesTab">showVariablesTab</a></td> |
|
151 <td>Public method to make a variables tab visible.</td> |
|
152 </tr> |
|
153 </table> |
|
154 <h3>Static Methods</h3> |
|
155 <table> |
|
156 <tr><td>None</td></tr> |
|
157 </table> |
|
158 <a NAME="DebugViewer.__init__" ID="DebugViewer.__init__"></a> |
|
159 <h4>DebugViewer (Constructor)</h4> |
|
160 <b>DebugViewer</b>(<i>debugServer, parent=None</i>) |
|
161 <p> |
|
162 Constructor |
|
163 </p><dl> |
|
164 <dt><i>debugServer</i></dt> |
|
165 <dd> |
|
166 reference to the debug server object (DebugServer) |
|
167 </dd><dt><i>parent</i></dt> |
|
168 <dd> |
|
169 parent widget (QWidget) |
|
170 </dd> |
|
171 </dl><a NAME="DebugViewer.__callStackFrameSelected" ID="DebugViewer.__callStackFrameSelected"></a> |
|
172 <h4>DebugViewer.__callStackFrameSelected</h4> |
|
173 <b>__callStackFrameSelected</b>(<i>frameNo</i>) |
|
174 <p> |
|
175 Private slot to handle the selection of a call stack entry of the |
|
176 call stack viewer. |
|
177 </p><dl> |
|
178 <dt><i>frameNo</i></dt> |
|
179 <dd> |
|
180 frame number (index) of the selected entry (integer) |
|
181 </dd> |
|
182 </dl><a NAME="DebugViewer.__frameSelected" ID="DebugViewer.__frameSelected"></a> |
|
183 <h4>DebugViewer.__frameSelected</h4> |
|
184 <b>__frameSelected</b>(<i>frmnr</i>) |
|
185 <p> |
|
186 Private slot to handle the selection of a new stack frame number. |
|
187 </p><dl> |
|
188 <dt><i>frmnr</i></dt> |
|
189 <dd> |
|
190 frame number (0 is the current frame) (int) |
|
191 </dd> |
|
192 </dl><a NAME="DebugViewer.__showSource" ID="DebugViewer.__showSource"></a> |
|
193 <h4>DebugViewer.__showSource</h4> |
|
194 <b>__showSource</b>(<i></i>) |
|
195 <p> |
|
196 Private slot to handle the source button press to show the selected |
|
197 file. |
|
198 </p><a NAME="DebugViewer.__threadSelected" ID="DebugViewer.__threadSelected"></a> |
|
199 <h4>DebugViewer.__threadSelected</h4> |
|
200 <b>__threadSelected</b>(<i>current, previous</i>) |
|
201 <p> |
|
202 Private slot to handle the selection of a thread in the thread list. |
|
203 </p><dl> |
|
204 <dt><i>current</i></dt> |
|
205 <dd> |
|
206 reference to the new current item (QTreeWidgetItem) |
|
207 </dd><dt><i>previous</i></dt> |
|
208 <dd> |
|
209 reference to the previous current item |
|
210 (QTreeWidgetItem) |
|
211 </dd> |
|
212 </dl><a NAME="DebugViewer.clearCallTrace" ID="DebugViewer.clearCallTrace"></a> |
|
213 <h4>DebugViewer.clearCallTrace</h4> |
|
214 <b>clearCallTrace</b>(<i></i>) |
|
215 <p> |
|
216 Public method to clear the recorded call trace. |
|
217 </p><a NAME="DebugViewer.currentWidget" ID="DebugViewer.currentWidget"></a> |
|
218 <h4>DebugViewer.currentWidget</h4> |
|
219 <b>currentWidget</b>(<i></i>) |
|
220 <p> |
|
221 Public method to get a reference to the current widget. |
|
222 </p><dl> |
|
223 <dt>Returns:</dt> |
|
224 <dd> |
|
225 reference to the current widget (QWidget) |
|
226 </dd> |
|
227 </dl><a NAME="DebugViewer.handleClientStack" ID="DebugViewer.handleClientStack"></a> |
|
228 <h4>DebugViewer.handleClientStack</h4> |
|
229 <b>handleClientStack</b>(<i>stack</i>) |
|
230 <p> |
|
231 Public slot to show the call stack of the program being debugged. |
|
232 </p><dl> |
|
233 <dt><i>stack</i></dt> |
|
234 <dd> |
|
235 list of tuples with call stack data (file name, |
|
236 line number, function name, formatted argument/values list) |
|
237 </dd> |
|
238 </dl><a NAME="DebugViewer.handleDebuggingStarted" ID="DebugViewer.handleDebuggingStarted"></a> |
|
239 <h4>DebugViewer.handleDebuggingStarted</h4> |
|
240 <b>handleDebuggingStarted</b>(<i></i>) |
|
241 <p> |
|
242 Public slot to handle the start of a debugging session. |
|
243 </p><p> |
|
244 This slot sets the variables filter expressions. |
|
245 </p><a NAME="DebugViewer.handleResetUI" ID="DebugViewer.handleResetUI"></a> |
|
246 <h4>DebugViewer.handleResetUI</h4> |
|
247 <b>handleResetUI</b>(<i></i>) |
|
248 <p> |
|
249 Public method to reset the SBVviewer. |
|
250 </p><a NAME="DebugViewer.initCallStackViewer" ID="DebugViewer.initCallStackViewer"></a> |
|
251 <h4>DebugViewer.initCallStackViewer</h4> |
|
252 <b>initCallStackViewer</b>(<i>projectMode</i>) |
|
253 <p> |
|
254 Public method to initialize the call stack viewer. |
|
255 </p><dl> |
|
256 <dt><i>projectMode</i></dt> |
|
257 <dd> |
|
258 flag indicating to enable the project mode (boolean) |
|
259 </dd> |
|
260 </dl><a NAME="DebugViewer.isCallTraceEnabled" ID="DebugViewer.isCallTraceEnabled"></a> |
|
261 <h4>DebugViewer.isCallTraceEnabled</h4> |
|
262 <b>isCallTraceEnabled</b>(<i></i>) |
|
263 <p> |
|
264 Public method to get the state of the call trace function. |
|
265 </p><dl> |
|
266 <dt>Returns:</dt> |
|
267 <dd> |
|
268 flag indicating the state of the call trace function (boolean) |
|
269 </dd> |
|
270 </dl><a NAME="DebugViewer.preferencesChanged" ID="DebugViewer.preferencesChanged"></a> |
|
271 <h4>DebugViewer.preferencesChanged</h4> |
|
272 <b>preferencesChanged</b>(<i></i>) |
|
273 <p> |
|
274 Public slot to handle the preferencesChanged signal. |
|
275 </p><a NAME="DebugViewer.setCallTraceToProjectMode" ID="DebugViewer.setCallTraceToProjectMode"></a> |
|
276 <h4>DebugViewer.setCallTraceToProjectMode</h4> |
|
277 <b>setCallTraceToProjectMode</b>(<i>enabled</i>) |
|
278 <p> |
|
279 Public slot to set the call trace viewer to project mode. |
|
280 </p><p> |
|
281 In project mode the call trace info is shown with project relative |
|
282 path names. |
|
283 </p><dl> |
|
284 <dt><i>enabled</i></dt> |
|
285 <dd> |
|
286 flag indicating to enable the project mode (boolean) |
|
287 </dd> |
|
288 </dl><a NAME="DebugViewer.setCurrentWidget" ID="DebugViewer.setCurrentWidget"></a> |
|
289 <h4>DebugViewer.setCurrentWidget</h4> |
|
290 <b>setCurrentWidget</b>(<i>widget</i>) |
|
291 <p> |
|
292 Public slot to set the current page based on the given widget. |
|
293 </p><dl> |
|
294 <dt><i>widget</i></dt> |
|
295 <dd> |
|
296 reference to the widget (QWidget) |
|
297 </dd> |
|
298 </dl><a NAME="DebugViewer.setDebugger" ID="DebugViewer.setDebugger"></a> |
|
299 <h4>DebugViewer.setDebugger</h4> |
|
300 <b>setDebugger</b>(<i>debugUI</i>) |
|
301 <p> |
|
302 Public method to set a reference to the Debug UI. |
|
303 </p><dl> |
|
304 <dt><i>debugUI</i></dt> |
|
305 <dd> |
|
306 reference to the DebugUI object (DebugUI) |
|
307 </dd> |
|
308 </dl><a NAME="DebugViewer.setGlobalsFilter" ID="DebugViewer.setGlobalsFilter"></a> |
|
309 <h4>DebugViewer.setGlobalsFilter</h4> |
|
310 <b>setGlobalsFilter</b>(<i></i>) |
|
311 <p> |
|
312 Public slot to set the global variable filter. |
|
313 </p><a NAME="DebugViewer.setLocalsFilter" ID="DebugViewer.setLocalsFilter"></a> |
|
314 <h4>DebugViewer.setLocalsFilter</h4> |
|
315 <b>setLocalsFilter</b>(<i></i>) |
|
316 <p> |
|
317 Public slot to set the local variable filter. |
|
318 </p><a NAME="DebugViewer.setVariablesFilter" ID="DebugViewer.setVariablesFilter"></a> |
|
319 <h4>DebugViewer.setVariablesFilter</h4> |
|
320 <b>setVariablesFilter</b>(<i>globalsFilter, localsFilter</i>) |
|
321 <p> |
|
322 Public slot to set the local variables filter. |
|
323 </p><dl> |
|
324 <dt><i>globalsFilter</i></dt> |
|
325 <dd> |
|
326 filter list for global variable types |
|
327 (list of int) |
|
328 </dd><dt><i>localsFilter</i></dt> |
|
329 <dd> |
|
330 filter list for local variable types (list of int) |
|
331 </dd> |
|
332 </dl><a NAME="DebugViewer.showThreadList" ID="DebugViewer.showThreadList"></a> |
|
333 <h4>DebugViewer.showThreadList</h4> |
|
334 <b>showThreadList</b>(<i>currentID, threadList</i>) |
|
335 <p> |
|
336 Public method to show the thread list. |
|
337 </p><dl> |
|
338 <dt><i>currentID</i></dt> |
|
339 <dd> |
|
340 id of the current thread (integer) |
|
341 </dd><dt><i>threadList</i></dt> |
|
342 <dd> |
|
343 list of dictionaries containing the thread data |
|
344 </dd> |
|
345 </dl><a NAME="DebugViewer.showVariable" ID="DebugViewer.showVariable"></a> |
|
346 <h4>DebugViewer.showVariable</h4> |
|
347 <b>showVariable</b>(<i>vlist, showGlobals</i>) |
|
348 <p> |
|
349 Public method to show the variables in the respective window. |
|
350 </p><dl> |
|
351 <dt><i>vlist</i></dt> |
|
352 <dd> |
|
353 list of variables to display |
|
354 </dd><dt><i>showGlobals</i></dt> |
|
355 <dd> |
|
356 flag indicating global/local state |
|
357 </dd> |
|
358 </dl><a NAME="DebugViewer.showVariables" ID="DebugViewer.showVariables"></a> |
|
359 <h4>DebugViewer.showVariables</h4> |
|
360 <b>showVariables</b>(<i>vlist, showGlobals</i>) |
|
361 <p> |
|
362 Public method to show the variables in the respective window. |
|
363 </p><dl> |
|
364 <dt><i>vlist</i></dt> |
|
365 <dd> |
|
366 list of variables to display |
|
367 </dd><dt><i>showGlobals</i></dt> |
|
368 <dd> |
|
369 flag indicating global/local state |
|
370 </dd> |
|
371 </dl><a NAME="DebugViewer.showVariablesTab" ID="DebugViewer.showVariablesTab"></a> |
|
372 <h4>DebugViewer.showVariablesTab</h4> |
|
373 <b>showVariablesTab</b>(<i>showGlobals</i>) |
|
374 <p> |
|
375 Public method to make a variables tab visible. |
|
376 </p><dl> |
|
377 <dt><i>showGlobals</i></dt> |
|
378 <dd> |
|
379 flag indicating global/local state |
|
380 </dd> |
|
381 </dl> |
|
382 <div align="right"><a href="#top">Up</a></div> |
|
383 <hr /> |
|
384 </body></html> |