Documentation/Source/eric6.DebugClients.Python.DebugBase.html

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

eric ide

mercurial