1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.DebugClients.Python.DebugBase</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.DebugClients.Python.DebugBase</h1> |
|
23 <p> |
|
24 Module implementing the debug base class. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>gRecursionLimit</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#DebugBase">DebugBase</a></td> |
|
34 <td>Class implementing base class of the debugger.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr> |
|
40 <td><a href="#printerr">printerr</a></td> |
|
41 <td>Module function used for debugging the debug client.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#setRecursionLimit">setRecursionLimit</a></td> |
|
44 <td>Module function to set the recursion limit.</td> |
|
45 </tr> |
|
46 </table> |
|
47 <hr /><hr /> |
|
48 <a NAME="DebugBase" ID="DebugBase"></a> |
|
49 <h2>DebugBase</h2> |
|
50 <p> |
|
51 Class implementing base class of the debugger. |
|
52 </p><p> |
|
53 Provides simple wrapper methods around bdb for the 'owning' client to |
|
54 call to step etc. |
|
55 </p> |
|
56 <h3>Derived from</h3> |
|
57 bdb.Bdb |
|
58 <h3>Class Attributes</h3> |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 <table> |
|
64 <tr><td>None</td></tr> |
|
65 </table> |
|
66 <h3>Methods</h3> |
|
67 <table> |
|
68 <tr> |
|
69 <td><a href="#DebugBase.__init__">DebugBase</a></td> |
|
70 <td>Constructor</td> |
|
71 </tr><tr> |
|
72 <td><a href="#DebugBase.__do_clear">__do_clear</a></td> |
|
73 <td>Private method called to clear a temporary breakpoint.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#DebugBase.__do_clearWatch">__do_clearWatch</a></td> |
|
76 <td>Private method called to clear a temporary watch expression.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#DebugBase.__effective">__effective</a></td> |
|
79 <td>Private method to determine, if a watch expression is effective.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#DebugBase.__extract_stack">__extract_stack</a></td> |
|
82 <td>Private member to return a list of stack frames.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#DebugBase.__sendCallTrace">__sendCallTrace</a></td> |
|
85 <td>Private method to send a call/return trace.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#DebugBase.__skip_it">__skip_it</a></td> |
|
88 <td>Private method to filter out debugger files.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#DebugBase.break_anywhere">break_anywhere</a></td> |
|
91 <td>Public method reimplemented from bdb.py to do some special things.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#DebugBase.break_here">break_here</a></td> |
|
94 <td>Public method reimplemented from bdb.py to fix the filename from the frame.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#DebugBase.clear_watch">clear_watch</a></td> |
|
97 <td>Public method to clear a watch expression.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#DebugBase.dispatch_exception">dispatch_exception</a></td> |
|
100 <td>Public method reimplemented from bdb.py to always call user_exception.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#DebugBase.dispatch_line">dispatch_line</a></td> |
|
103 <td>Public method reimplemented from bdb.py to do some special things.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#DebugBase.dispatch_return">dispatch_return</a></td> |
|
106 <td>Public method reimplemented from bdb.py to handle passive mode cleanly.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#DebugBase.fix_frame_filename">fix_frame_filename</a></td> |
|
109 <td>Public method used to fixup the filename for a given frame.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#DebugBase.getCurrentFrame">getCurrentFrame</a></td> |
|
112 <td>Public method to return the current frame.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#DebugBase.getEvent">getEvent</a></td> |
|
115 <td>Protected method to return the last debugger event.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#DebugBase.getFrameLocals">getFrameLocals</a></td> |
|
118 <td>Public method to return the locals dictionary of the current frame or a frame below.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#DebugBase.getStack">getStack</a></td> |
|
121 <td>Public method to get the stack.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#DebugBase.get_break">get_break</a></td> |
|
124 <td>Public method reimplemented from bdb.py to get the first breakpoint of a particular line.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#DebugBase.get_watch">get_watch</a></td> |
|
127 <td>Public method to get a watch expression.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#DebugBase.go">go</a></td> |
|
130 <td>Public method to resume the thread.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#DebugBase.isBroken">isBroken</a></td> |
|
133 <td>Public method to return the broken state of the debugger.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#DebugBase.profile">profile</a></td> |
|
136 <td>Public method used to trace some stuff independent of the debugger trace function.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#DebugBase.setRecursionDepth">setRecursionDepth</a></td> |
|
139 <td>Public method to determine the current recursion depth.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#DebugBase.set_continue">set_continue</a></td> |
|
142 <td>Public method reimplemented from bdb.py to always get informed of exceptions.</td> |
|
143 </tr><tr> |
|
144 <td><a href="#DebugBase.set_quit">set_quit</a></td> |
|
145 <td>Public method to quit.</td> |
|
146 </tr><tr> |
|
147 <td><a href="#DebugBase.set_trace">set_trace</a></td> |
|
148 <td>Public method reimplemented from bdb.py to do some special setup.</td> |
|
149 </tr><tr> |
|
150 <td><a href="#DebugBase.set_watch">set_watch</a></td> |
|
151 <td>Public method to set a watch expression.</td> |
|
152 </tr><tr> |
|
153 <td><a href="#DebugBase.step">step</a></td> |
|
154 <td>Public method to perform a step operation in this thread.</td> |
|
155 </tr><tr> |
|
156 <td><a href="#DebugBase.stepOut">stepOut</a></td> |
|
157 <td>Public method to perform a step out of the current call.</td> |
|
158 </tr><tr> |
|
159 <td><a href="#DebugBase.stop_here">stop_here</a></td> |
|
160 <td>Public method reimplemented to filter out debugger files.</td> |
|
161 </tr><tr> |
|
162 <td><a href="#DebugBase.storeFrameLocals">storeFrameLocals</a></td> |
|
163 <td>Public method to store the locals into the frame, so an access to frame.f_locals returns the last data.</td> |
|
164 </tr><tr> |
|
165 <td><a href="#DebugBase.trace_dispatch">trace_dispatch</a></td> |
|
166 <td>Public method reimplemented from bdb.py to do some special things.</td> |
|
167 </tr><tr> |
|
168 <td><a href="#DebugBase.user_exception">user_exception</a></td> |
|
169 <td>Public method reimplemented to report an exception to the debug server.</td> |
|
170 </tr><tr> |
|
171 <td><a href="#DebugBase.user_line">user_line</a></td> |
|
172 <td>Public method reimplemented to handle the program about to execute a particular line.</td> |
|
173 </tr><tr> |
|
174 <td><a href="#DebugBase.user_return">user_return</a></td> |
|
175 <td>Public method reimplemented to report program termination to the debug server.</td> |
|
176 </tr> |
|
177 </table> |
|
178 <h3>Static Methods</h3> |
|
179 <table> |
|
180 <tr><td>None</td></tr> |
|
181 </table> |
|
182 <a NAME="DebugBase.__init__" ID="DebugBase.__init__"></a> |
|
183 <h4>DebugBase (Constructor)</h4> |
|
184 <b>DebugBase</b>(<i>dbgClient</i>) |
|
185 <p> |
|
186 Constructor |
|
187 </p><dl> |
|
188 <dt><i>dbgClient</i></dt> |
|
189 <dd> |
|
190 the owning client |
|
191 </dd> |
|
192 </dl><a NAME="DebugBase.__do_clear" ID="DebugBase.__do_clear"></a> |
|
193 <h4>DebugBase.__do_clear</h4> |
|
194 <b>__do_clear</b>(<i>filename, lineno</i>) |
|
195 <p> |
|
196 Private method called to clear a temporary breakpoint. |
|
197 </p><dl> |
|
198 <dt><i>filename</i></dt> |
|
199 <dd> |
|
200 name of the file the bp belongs to |
|
201 </dd><dt><i>lineno</i></dt> |
|
202 <dd> |
|
203 linenumber of the bp |
|
204 </dd> |
|
205 </dl><a NAME="DebugBase.__do_clearWatch" ID="DebugBase.__do_clearWatch"></a> |
|
206 <h4>DebugBase.__do_clearWatch</h4> |
|
207 <b>__do_clearWatch</b>(<i>cond</i>) |
|
208 <p> |
|
209 Private method called to clear a temporary watch expression. |
|
210 </p><dl> |
|
211 <dt><i>cond</i></dt> |
|
212 <dd> |
|
213 expression of the watch expression to be cleared (string) |
|
214 </dd> |
|
215 </dl><a NAME="DebugBase.__effective" ID="DebugBase.__effective"></a> |
|
216 <h4>DebugBase.__effective</h4> |
|
217 <b>__effective</b>(<i>frame</i>) |
|
218 <p> |
|
219 Private method to determine, if a watch expression is effective. |
|
220 </p><dl> |
|
221 <dt><i>frame</i></dt> |
|
222 <dd> |
|
223 the current execution frame |
|
224 </dd> |
|
225 </dl><dl> |
|
226 <dt>Returns:</dt> |
|
227 <dd> |
|
228 tuple of watch expression and a flag to indicate, that a |
|
229 temporary watch expression may be deleted (bdb.Breakpoint, boolean) |
|
230 </dd> |
|
231 </dl><a NAME="DebugBase.__extract_stack" ID="DebugBase.__extract_stack"></a> |
|
232 <h4>DebugBase.__extract_stack</h4> |
|
233 <b>__extract_stack</b>(<i>exctb</i>) |
|
234 <p> |
|
235 Private member to return a list of stack frames. |
|
236 </p><dl> |
|
237 <dt><i>exctb</i></dt> |
|
238 <dd> |
|
239 exception traceback |
|
240 </dd> |
|
241 </dl><dl> |
|
242 <dt>Returns:</dt> |
|
243 <dd> |
|
244 list of stack frames |
|
245 </dd> |
|
246 </dl><a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a> |
|
247 <h4>DebugBase.__sendCallTrace</h4> |
|
248 <b>__sendCallTrace</b>(<i>event, fromFrame, toFrame</i>) |
|
249 <p> |
|
250 Private method to send a call/return trace. |
|
251 </p><dl> |
|
252 <dt><i>event</i></dt> |
|
253 <dd> |
|
254 trace event (string) |
|
255 </dd><dt><i>fromFrame</i></dt> |
|
256 <dd> |
|
257 originating frame (frame) |
|
258 </dd><dt><i>toFrame</i></dt> |
|
259 <dd> |
|
260 destination frame (frame) |
|
261 </dd> |
|
262 </dl><a NAME="DebugBase.__skip_it" ID="DebugBase.__skip_it"></a> |
|
263 <h4>DebugBase.__skip_it</h4> |
|
264 <b>__skip_it</b>(<i>frame</i>) |
|
265 <p> |
|
266 Private method to filter out debugger files. |
|
267 </p><p> |
|
268 Tracing is turned off for files that are part of the |
|
269 debugger that are called from the application being debugged. |
|
270 </p><dl> |
|
271 <dt><i>frame</i></dt> |
|
272 <dd> |
|
273 the frame object |
|
274 </dd> |
|
275 </dl><dl> |
|
276 <dt>Returns:</dt> |
|
277 <dd> |
|
278 flag indicating whether the debugger should skip this frame |
|
279 </dd> |
|
280 </dl><a NAME="DebugBase.break_anywhere" ID="DebugBase.break_anywhere"></a> |
|
281 <h4>DebugBase.break_anywhere</h4> |
|
282 <b>break_anywhere</b>(<i>frame</i>) |
|
283 <p> |
|
284 Public method reimplemented from bdb.py to do some special things. |
|
285 </p><p> |
|
286 These speciality is to fix the filename from the frame |
|
287 (see fix_frame_filename for more info). |
|
288 </p><dl> |
|
289 <dt><i>frame</i></dt> |
|
290 <dd> |
|
291 the frame object |
|
292 </dd> |
|
293 </dl><dl> |
|
294 <dt>Returns:</dt> |
|
295 <dd> |
|
296 flag indicating the break status (boolean) |
|
297 </dd> |
|
298 </dl><a NAME="DebugBase.break_here" ID="DebugBase.break_here"></a> |
|
299 <h4>DebugBase.break_here</h4> |
|
300 <b>break_here</b>(<i>frame</i>) |
|
301 <p> |
|
302 Public method reimplemented from bdb.py to fix the filename from the |
|
303 frame. |
|
304 </p><p> |
|
305 See fix_frame_filename for more info. |
|
306 </p><dl> |
|
307 <dt><i>frame</i></dt> |
|
308 <dd> |
|
309 the frame object |
|
310 </dd> |
|
311 </dl><dl> |
|
312 <dt>Returns:</dt> |
|
313 <dd> |
|
314 flag indicating the break status (boolean) |
|
315 </dd> |
|
316 </dl><a NAME="DebugBase.clear_watch" ID="DebugBase.clear_watch"></a> |
|
317 <h4>DebugBase.clear_watch</h4> |
|
318 <b>clear_watch</b>(<i>cond</i>) |
|
319 <p> |
|
320 Public method to clear a watch expression. |
|
321 </p><dl> |
|
322 <dt><i>cond</i></dt> |
|
323 <dd> |
|
324 expression of the watch expression to be cleared (string) |
|
325 </dd> |
|
326 </dl><a NAME="DebugBase.dispatch_exception" ID="DebugBase.dispatch_exception"></a> |
|
327 <h4>DebugBase.dispatch_exception</h4> |
|
328 <b>dispatch_exception</b>(<i>frame, arg</i>) |
|
329 <p> |
|
330 Public method reimplemented from bdb.py to always call user_exception. |
|
331 </p><dl> |
|
332 <dt><i>frame</i></dt> |
|
333 <dd> |
|
334 The current stack frame. |
|
335 </dd><dt><i>arg</i></dt> |
|
336 <dd> |
|
337 The arguments |
|
338 </dd> |
|
339 </dl><dl> |
|
340 <dt>Returns:</dt> |
|
341 <dd> |
|
342 local trace function |
|
343 </dd> |
|
344 </dl><dl> |
|
345 <dt>Raises <b>bdb.BdbQuit</b>:</dt> |
|
346 <dd> |
|
347 raised to indicate the end of the debug session |
|
348 </dd> |
|
349 </dl><a NAME="DebugBase.dispatch_line" ID="DebugBase.dispatch_line"></a> |
|
350 <h4>DebugBase.dispatch_line</h4> |
|
351 <b>dispatch_line</b>(<i>frame</i>) |
|
352 <p> |
|
353 Public method reimplemented from bdb.py to do some special things. |
|
354 </p><p> |
|
355 This speciality is to check the connection to the debug server |
|
356 for new events (i.e. new breakpoints) while we are going through |
|
357 the code. |
|
358 </p><dl> |
|
359 <dt><i>frame</i></dt> |
|
360 <dd> |
|
361 The current stack frame. |
|
362 </dd> |
|
363 </dl><dl> |
|
364 <dt>Returns:</dt> |
|
365 <dd> |
|
366 local trace function |
|
367 </dd> |
|
368 </dl><dl> |
|
369 <dt>Raises <b>bdb.BdbQuit</b>:</dt> |
|
370 <dd> |
|
371 raised to indicate the end of the debug session |
|
372 </dd> |
|
373 </dl><a NAME="DebugBase.dispatch_return" ID="DebugBase.dispatch_return"></a> |
|
374 <h4>DebugBase.dispatch_return</h4> |
|
375 <b>dispatch_return</b>(<i>frame, arg</i>) |
|
376 <p> |
|
377 Public method reimplemented from bdb.py to handle passive mode cleanly. |
|
378 </p><dl> |
|
379 <dt><i>frame</i></dt> |
|
380 <dd> |
|
381 The current stack frame. |
|
382 </dd><dt><i>arg</i></dt> |
|
383 <dd> |
|
384 The arguments |
|
385 </dd> |
|
386 </dl><dl> |
|
387 <dt>Returns:</dt> |
|
388 <dd> |
|
389 local trace function |
|
390 </dd> |
|
391 </dl><dl> |
|
392 <dt>Raises <b>bdb.BdbQuit</b>:</dt> |
|
393 <dd> |
|
394 raised to indicate the end of the debug session |
|
395 </dd> |
|
396 </dl><a NAME="DebugBase.fix_frame_filename" ID="DebugBase.fix_frame_filename"></a> |
|
397 <h4>DebugBase.fix_frame_filename</h4> |
|
398 <b>fix_frame_filename</b>(<i>frame</i>) |
|
399 <p> |
|
400 Public method used to fixup the filename for a given frame. |
|
401 </p><p> |
|
402 The logic employed here is that if a module was loaded |
|
403 from a .pyc file, then the correct .py to operate with |
|
404 should be in the same path as the .pyc. The reason this |
|
405 logic is needed is that when a .pyc file is generated, the |
|
406 filename embedded and thus what is readable in the code object |
|
407 of the frame object is the fully qualified filepath when the |
|
408 pyc is generated. If files are moved from machine to machine |
|
409 this can break debugging as the .pyc will refer to the .py |
|
410 on the original machine. Another case might be sharing |
|
411 code over a network... This logic deals with that. |
|
412 </p><dl> |
|
413 <dt><i>frame</i></dt> |
|
414 <dd> |
|
415 the frame object |
|
416 </dd> |
|
417 </dl><dl> |
|
418 <dt>Returns:</dt> |
|
419 <dd> |
|
420 fixed up file name (string) |
|
421 </dd> |
|
422 </dl><a NAME="DebugBase.getCurrentFrame" ID="DebugBase.getCurrentFrame"></a> |
|
423 <h4>DebugBase.getCurrentFrame</h4> |
|
424 <b>getCurrentFrame</b>(<i></i>) |
|
425 <p> |
|
426 Public method to return the current frame. |
|
427 </p><dl> |
|
428 <dt>Returns:</dt> |
|
429 <dd> |
|
430 the current frame |
|
431 </dd> |
|
432 </dl><a NAME="DebugBase.getEvent" ID="DebugBase.getEvent"></a> |
|
433 <h4>DebugBase.getEvent</h4> |
|
434 <b>getEvent</b>(<i></i>) |
|
435 <p> |
|
436 Protected method to return the last debugger event. |
|
437 </p><dl> |
|
438 <dt>Returns:</dt> |
|
439 <dd> |
|
440 last debugger event (string) |
|
441 </dd> |
|
442 </dl><a NAME="DebugBase.getFrameLocals" ID="DebugBase.getFrameLocals"></a> |
|
443 <h4>DebugBase.getFrameLocals</h4> |
|
444 <b>getFrameLocals</b>(<i>frmnr=0</i>) |
|
445 <p> |
|
446 Public method to return the locals dictionary of the current frame |
|
447 or a frame below. |
|
448 </p><dl> |
|
449 <dt><i>frmnr=</i></dt> |
|
450 <dd> |
|
451 distance of frame to get locals dictionary of. 0 is |
|
452 the current frame (int) |
|
453 </dd> |
|
454 </dl><dl> |
|
455 <dt>Returns:</dt> |
|
456 <dd> |
|
457 locals dictionary of the frame |
|
458 </dd> |
|
459 </dl><a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a> |
|
460 <h4>DebugBase.getStack</h4> |
|
461 <b>getStack</b>(<i></i>) |
|
462 <p> |
|
463 Public method to get the stack. |
|
464 </p><dl> |
|
465 <dt>Returns:</dt> |
|
466 <dd> |
|
467 list of lists with file name (string), line number (integer) |
|
468 and function name (string) |
|
469 </dd> |
|
470 </dl><a NAME="DebugBase.get_break" ID="DebugBase.get_break"></a> |
|
471 <h4>DebugBase.get_break</h4> |
|
472 <b>get_break</b>(<i>filename, lineno</i>) |
|
473 <p> |
|
474 Public method reimplemented from bdb.py to get the first breakpoint of |
|
475 a particular line. |
|
476 </p><p> |
|
477 Because eric6 supports only one breakpoint per line, this overwritten |
|
478 method will return this one and only breakpoint. |
|
479 </p><dl> |
|
480 <dt><i>filename</i></dt> |
|
481 <dd> |
|
482 filename of the bp to retrieve (string) |
|
483 </dd><dt><i>lineno</i></dt> |
|
484 <dd> |
|
485 linenumber of the bp to retrieve (integer) |
|
486 </dd> |
|
487 </dl><dl> |
|
488 <dt>Returns:</dt> |
|
489 <dd> |
|
490 breakpoint or None, if there is no bp |
|
491 </dd> |
|
492 </dl><a NAME="DebugBase.get_watch" ID="DebugBase.get_watch"></a> |
|
493 <h4>DebugBase.get_watch</h4> |
|
494 <b>get_watch</b>(<i>cond</i>) |
|
495 <p> |
|
496 Public method to get a watch expression. |
|
497 </p><dl> |
|
498 <dt><i>cond</i></dt> |
|
499 <dd> |
|
500 expression of the watch expression to be cleared (string) |
|
501 </dd> |
|
502 </dl><dl> |
|
503 <dt>Returns:</dt> |
|
504 <dd> |
|
505 reference to the watch point |
|
506 </dd> |
|
507 </dl><a NAME="DebugBase.go" ID="DebugBase.go"></a> |
|
508 <h4>DebugBase.go</h4> |
|
509 <b>go</b>(<i>special</i>) |
|
510 <p> |
|
511 Public method to resume the thread. |
|
512 </p><p> |
|
513 It resumes the thread stopping only at breakpoints or exceptions. |
|
514 </p><dl> |
|
515 <dt><i>special</i></dt> |
|
516 <dd> |
|
517 flag indicating a special continue operation |
|
518 </dd> |
|
519 </dl><a NAME="DebugBase.isBroken" ID="DebugBase.isBroken"></a> |
|
520 <h4>DebugBase.isBroken</h4> |
|
521 <b>isBroken</b>(<i></i>) |
|
522 <p> |
|
523 Public method to return the broken state of the debugger. |
|
524 </p><dl> |
|
525 <dt>Returns:</dt> |
|
526 <dd> |
|
527 flag indicating the broken state (boolean) |
|
528 </dd> |
|
529 </dl><a NAME="DebugBase.profile" ID="DebugBase.profile"></a> |
|
530 <h4>DebugBase.profile</h4> |
|
531 <b>profile</b>(<i>frame, event, arg</i>) |
|
532 <p> |
|
533 Public method used to trace some stuff independent of the debugger |
|
534 trace function. |
|
535 </p><dl> |
|
536 <dt><i>frame</i></dt> |
|
537 <dd> |
|
538 current stack frame. |
|
539 </dd><dt><i>event</i></dt> |
|
540 <dd> |
|
541 trace event (string) |
|
542 </dd><dt><i>arg</i></dt> |
|
543 <dd> |
|
544 arguments |
|
545 </dd> |
|
546 </dl><dl> |
|
547 <dt>Raises <b>RuntimeError</b>:</dt> |
|
548 <dd> |
|
549 raised to indicate too many recursions |
|
550 </dd> |
|
551 </dl><a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a> |
|
552 <h4>DebugBase.setRecursionDepth</h4> |
|
553 <b>setRecursionDepth</b>(<i>frame</i>) |
|
554 <p> |
|
555 Public method to determine the current recursion depth. |
|
556 </p><dl> |
|
557 <dt><i>frame</i></dt> |
|
558 <dd> |
|
559 The current stack frame. |
|
560 </dd> |
|
561 </dl><a NAME="DebugBase.set_continue" ID="DebugBase.set_continue"></a> |
|
562 <h4>DebugBase.set_continue</h4> |
|
563 <b>set_continue</b>(<i>special</i>) |
|
564 <p> |
|
565 Public method reimplemented from bdb.py to always get informed of |
|
566 exceptions. |
|
567 </p><dl> |
|
568 <dt><i>special</i></dt> |
|
569 <dd> |
|
570 flag indicating a special continue operation |
|
571 </dd> |
|
572 </dl><a NAME="DebugBase.set_quit" ID="DebugBase.set_quit"></a> |
|
573 <h4>DebugBase.set_quit</h4> |
|
574 <b>set_quit</b>(<i></i>) |
|
575 <p> |
|
576 Public method to quit. |
|
577 </p><p> |
|
578 It wraps call to bdb to clear the current frame properly. |
|
579 </p><a NAME="DebugBase.set_trace" ID="DebugBase.set_trace"></a> |
|
580 <h4>DebugBase.set_trace</h4> |
|
581 <b>set_trace</b>(<i>frame=None</i>) |
|
582 <p> |
|
583 Public method reimplemented from bdb.py to do some special setup. |
|
584 </p><dl> |
|
585 <dt><i>frame</i></dt> |
|
586 <dd> |
|
587 frame to start debugging from |
|
588 </dd> |
|
589 </dl><a NAME="DebugBase.set_watch" ID="DebugBase.set_watch"></a> |
|
590 <h4>DebugBase.set_watch</h4> |
|
591 <b>set_watch</b>(<i>cond, temporary=0</i>) |
|
592 <p> |
|
593 Public method to set a watch expression. |
|
594 </p><dl> |
|
595 <dt><i>cond</i></dt> |
|
596 <dd> |
|
597 expression of the watch expression (string) |
|
598 </dd><dt><i>temporary</i></dt> |
|
599 <dd> |
|
600 flag indicating a temporary watch expression (boolean) |
|
601 </dd> |
|
602 </dl><a NAME="DebugBase.step" ID="DebugBase.step"></a> |
|
603 <h4>DebugBase.step</h4> |
|
604 <b>step</b>(<i>traceMode</i>) |
|
605 <p> |
|
606 Public method to perform a step operation in this thread. |
|
607 </p><dl> |
|
608 <dt><i>traceMode</i></dt> |
|
609 <dd> |
|
610 If it is non-zero, then the step is a step into, |
|
611 otherwise it is a step over. |
|
612 </dd> |
|
613 </dl><a NAME="DebugBase.stepOut" ID="DebugBase.stepOut"></a> |
|
614 <h4>DebugBase.stepOut</h4> |
|
615 <b>stepOut</b>(<i></i>) |
|
616 <p> |
|
617 Public method to perform a step out of the current call. |
|
618 </p><a NAME="DebugBase.stop_here" ID="DebugBase.stop_here"></a> |
|
619 <h4>DebugBase.stop_here</h4> |
|
620 <b>stop_here</b>(<i>frame</i>) |
|
621 <p> |
|
622 Public method reimplemented to filter out debugger files. |
|
623 </p><p> |
|
624 Tracing is turned off for files that are part of the |
|
625 debugger that are called from the application being debugged. |
|
626 </p><dl> |
|
627 <dt><i>frame</i></dt> |
|
628 <dd> |
|
629 the frame object |
|
630 </dd> |
|
631 </dl><dl> |
|
632 <dt>Returns:</dt> |
|
633 <dd> |
|
634 flag indicating whether the debugger should stop here |
|
635 </dd> |
|
636 </dl><a NAME="DebugBase.storeFrameLocals" ID="DebugBase.storeFrameLocals"></a> |
|
637 <h4>DebugBase.storeFrameLocals</h4> |
|
638 <b>storeFrameLocals</b>(<i>frmnr=0</i>) |
|
639 <p> |
|
640 Public method to store the locals into the frame, so an access to |
|
641 frame.f_locals returns the last data. |
|
642 </p><dl> |
|
643 <dt><i>frmnr=</i></dt> |
|
644 <dd> |
|
645 distance of frame to store locals dictionary to. 0 is |
|
646 the current frame (int) |
|
647 </dd> |
|
648 </dl><a NAME="DebugBase.trace_dispatch" ID="DebugBase.trace_dispatch"></a> |
|
649 <h4>DebugBase.trace_dispatch</h4> |
|
650 <b>trace_dispatch</b>(<i>frame, event, arg</i>) |
|
651 <p> |
|
652 Public method reimplemented from bdb.py to do some special things. |
|
653 </p><p> |
|
654 This specialty is to check the connection to the debug server |
|
655 for new events (i.e. new breakpoints) while we are going through |
|
656 the code. |
|
657 </p><dl> |
|
658 <dt><i>frame</i></dt> |
|
659 <dd> |
|
660 The current stack frame. |
|
661 </dd><dt><i>event</i></dt> |
|
662 <dd> |
|
663 The trace event (string) |
|
664 </dd><dt><i>arg</i></dt> |
|
665 <dd> |
|
666 The arguments |
|
667 </dd> |
|
668 </dl><dl> |
|
669 <dt>Returns:</dt> |
|
670 <dd> |
|
671 local trace function |
|
672 </dd> |
|
673 </dl><a NAME="DebugBase.user_exception" ID="DebugBase.user_exception"></a> |
|
674 <h4>DebugBase.user_exception</h4> |
|
675 <b>user_exception</b>(<i>frame, (exctype, excval, exctb), unhandled=0</i>) |
|
676 <p> |
|
677 Public method reimplemented to report an exception to the debug server. |
|
678 </p><dl> |
|
679 <dt><i>frame</i></dt> |
|
680 <dd> |
|
681 the frame object |
|
682 </dd><dt><i>exctype</i></dt> |
|
683 <dd> |
|
684 the type of the exception |
|
685 </dd><dt><i>excval</i></dt> |
|
686 <dd> |
|
687 data about the exception |
|
688 </dd><dt><i>exctb</i></dt> |
|
689 <dd> |
|
690 traceback for the exception |
|
691 </dd><dt><i>unhandled</i></dt> |
|
692 <dd> |
|
693 flag indicating an uncaught exception |
|
694 </dd> |
|
695 </dl><a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a> |
|
696 <h4>DebugBase.user_line</h4> |
|
697 <b>user_line</b>(<i>frame</i>) |
|
698 <p> |
|
699 Public method reimplemented to handle the program about to execute a |
|
700 particular line. |
|
701 </p><dl> |
|
702 <dt><i>frame</i></dt> |
|
703 <dd> |
|
704 the frame object |
|
705 </dd> |
|
706 </dl><a NAME="DebugBase.user_return" ID="DebugBase.user_return"></a> |
|
707 <h4>DebugBase.user_return</h4> |
|
708 <b>user_return</b>(<i>frame, retval</i>) |
|
709 <p> |
|
710 Public method reimplemented to report program termination to the |
|
711 debug server. |
|
712 </p><dl> |
|
713 <dt><i>frame</i></dt> |
|
714 <dd> |
|
715 the frame object |
|
716 </dd><dt><i>retval</i></dt> |
|
717 <dd> |
|
718 the return value of the program |
|
719 </dd> |
|
720 </dl> |
|
721 <div align="right"><a href="#top">Up</a></div> |
|
722 <hr /><hr /> |
|
723 <a NAME="printerr" ID="printerr"></a> |
|
724 <h2>printerr</h2> |
|
725 <b>printerr</b>(<i>s</i>) |
|
726 <p> |
|
727 Module function used for debugging the debug client. |
|
728 </p><dl> |
|
729 <dt><i>s</i></dt> |
|
730 <dd> |
|
731 data to be printed |
|
732 </dd> |
|
733 </dl> |
|
734 <div align="right"><a href="#top">Up</a></div> |
|
735 <hr /><hr /> |
|
736 <a NAME="setRecursionLimit" ID="setRecursionLimit"></a> |
|
737 <h2>setRecursionLimit</h2> |
|
738 <b>setRecursionLimit</b>(<i>limit</i>) |
|
739 <p> |
|
740 Module function to set the recursion limit. |
|
741 </p><dl> |
|
742 <dt><i>limit</i></dt> |
|
743 <dd> |
|
744 recursion limit (integer) |
|
745 </dd> |
|
746 </dl> |
|
747 <div align="right"><a href="#top">Up</a></div> |
|
748 <hr /> |
|
749 </body></html> |
|