src/eric7/Documentation/Source/eric7.DebugClients.Python.DebugBase.html

branch
eric7
changeset 10479
856476537696
parent 10478
de9106c55c3d
child 10684
58c7f23ae1cb
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.DebugClients.Python.DebugBase</h1> 9 <h1>eric7.DebugClients.Python.DebugBase</h1>
10
11 <p> 10 <p>
12 Module implementing the debug base class which based originally on bdb. 11 Module implementing the debug base class which based originally on bdb.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15
16 <table> 15 <table>
17 <tr><td>GENERATOR_AND_COROUTINE_FLAGS</td></tr><tr><td>gRecursionLimit</td></tr> 16 <tr><td>GENERATOR_AND_COROUTINE_FLAGS</td></tr>
17 <tr><td>gRecursionLimit</td></tr>
18 </table> 18 </table>
19
19 <h3>Classes</h3> 20 <h3>Classes</h3>
20
21 <table> 21 <table>
22
23 <tr> 22 <tr>
24 <td><a href="#DebugBase">DebugBase</a></td> 23 <td><a href="#DebugBase">DebugBase</a></td>
25 <td>Class implementing base class of the debugger.</td> 24 <td>Class implementing base class of the debugger.</td>
26 </tr> 25 </tr>
27 </table> 26 </table>
27
28 <h3>Functions</h3> 28 <h3>Functions</h3>
29
30 <table> 29 <table>
31
32 <tr> 30 <tr>
33 <td><a href="#printerr">printerr</a></td> 31 <td><a href="#printerr">printerr</a></td>
34 <td>Module function used for debugging the debug client.</td> 32 <td>Module function used for debugging the debug client.</td>
35 </tr> 33 </tr>
36 <tr> 34 <tr>
37 <td><a href="#setRecursionLimit">setRecursionLimit</a></td> 35 <td><a href="#setRecursionLimit">setRecursionLimit</a></td>
38 <td>Module function to set the recursion limit.</td> 36 <td>Module function to set the recursion limit.</td>
39 </tr> 37 </tr>
40 </table> 38 </table>
39
41 <hr /> 40 <hr />
42 <hr /> 41 <hr />
43 <a NAME="DebugBase" ID="DebugBase"></a> 42 <a NAME="DebugBase" ID="DebugBase"></a>
44 <h2>DebugBase</h2> 43 <h2>DebugBase</h2>
45
46 <p> 44 <p>
47 Class implementing base class of the debugger. 45 Class implementing base class of the debugger.
48 </p> 46 </p>
49 <p> 47 <p>
50 Provides methods for the 'owning' client to call to step etc. 48 Provides methods for the 'owning' client to call to step etc.
51 </p> 49 </p>
50
52 <h3>Derived from</h3> 51 <h3>Derived from</h3>
53 None 52 None
54 <h3>Class Attributes</h3> 53 <h3>Class Attributes</h3>
55
56 <table> 54 <table>
57 <tr><td>_fnCache</td></tr><tr><td>filesToSkip</td></tr><tr><td>lib</td></tr><tr><td>pathsToSkip</td></tr><tr><td>pollTimerEnabled</td></tr> 55 <tr><td>_fnCache</td></tr>
56 <tr><td>filesToSkip</td></tr>
57 <tr><td>lib</td></tr>
58 <tr><td>pathsToSkip</td></tr>
59 <tr><td>pollTimerEnabled</td></tr>
58 </table> 60 </table>
61
59 <h3>Class Methods</h3> 62 <h3>Class Methods</h3>
60
61 <table> 63 <table>
62 <tr><td>None</td></tr> 64 <tr><td>None</td></tr>
63 </table> 65 </table>
66
64 <h3>Methods</h3> 67 <h3>Methods</h3>
65
66 <table> 68 <table>
67
68 <tr> 69 <tr>
69 <td><a href="#DebugBase.__init__">DebugBase</a></td> 70 <td><a href="#DebugBase.__init__">DebugBase</a></td>
70 <td>Constructor</td> 71 <td>Constructor</td>
71 </tr> 72 </tr>
72 <tr> 73 <tr>
220 <tr> 221 <tr>
221 <td><a href="#DebugBase.user_line">user_line</a></td> 222 <td><a href="#DebugBase.user_line">user_line</a></td>
222 <td>Public method reimplemented to handle the program about to execute a particular line.</td> 223 <td>Public method reimplemented to handle the program about to execute a particular line.</td>
223 </tr> 224 </tr>
224 </table> 225 </table>
226
225 <h3>Static Methods</h3> 227 <h3>Static Methods</h3>
226
227 <table> 228 <table>
228 <tr><td>None</td></tr> 229 <tr><td>None</td></tr>
229 </table> 230 </table>
230 231
232
231 <a NAME="DebugBase.__init__" ID="DebugBase.__init__"></a> 233 <a NAME="DebugBase.__init__" ID="DebugBase.__init__"></a>
232 <h4>DebugBase (Constructor)</h4> 234 <h4>DebugBase (Constructor)</h4>
233 <b>DebugBase</b>(<i>dbgClient</i>) 235 <b>DebugBase</b>(<i>dbgClient</i>)
234
235 <p> 236 <p>
236 Constructor 237 Constructor
237 </p> 238 </p>
239
238 <dl> 240 <dl>
239 241
240 <dt><i>dbgClient</i> (DebugClient)</dt> 242 <dt><i>dbgClient</i> (DebugClient)</dt>
241 <dd> 243 <dd>
242 the owning client 244 the owning client
243 </dd> 245 </dd>
244 </dl> 246 </dl>
245 <a NAME="DebugBase.__checkBreakInFrame" ID="DebugBase.__checkBreakInFrame"></a> 247 <a NAME="DebugBase.__checkBreakInFrame" ID="DebugBase.__checkBreakInFrame"></a>
246 <h4>DebugBase.__checkBreakInFrame</h4> 248 <h4>DebugBase.__checkBreakInFrame</h4>
247 <b>__checkBreakInFrame</b>(<i>frame</i>) 249 <b>__checkBreakInFrame</b>(<i>frame</i>)
248
249 <p> 250 <p>
250 Private method to check if the function / method has a line number 251 Private method to check if the function / method has a line number
251 which is a breakpoint. 252 which is a breakpoint.
252 </p> 253 </p>
254
253 <dl> 255 <dl>
254 256
255 <dt><i>frame</i> (frame object)</dt> 257 <dt><i>frame</i> (frame object)</dt>
256 <dd> 258 <dd>
257 the frame object 259 the frame object
270 </dd> 272 </dd>
271 </dl> 273 </dl>
272 <a NAME="DebugBase.__disassemble" ID="DebugBase.__disassemble"></a> 274 <a NAME="DebugBase.__disassemble" ID="DebugBase.__disassemble"></a>
273 <h4>DebugBase.__disassemble</h4> 275 <h4>DebugBase.__disassemble</h4>
274 <b>__disassemble</b>(<i>frame</i>) 276 <b>__disassemble</b>(<i>frame</i>)
275
276 <p> 277 <p>
277 Private method to generate a disassembly of the given code object. 278 Private method to generate a disassembly of the given code object.
278 </p> 279 </p>
280
279 <dl> 281 <dl>
280 282
281 <dt><i>frame</i> (code)</dt> 283 <dt><i>frame</i> (code)</dt>
282 <dd> 284 <dd>
283 frame object to be disassembled 285 frame object to be disassembled
296 </dd> 298 </dd>
297 </dl> 299 </dl>
298 <a NAME="DebugBase.__do_clearBreak" ID="DebugBase.__do_clearBreak"></a> 300 <a NAME="DebugBase.__do_clearBreak" ID="DebugBase.__do_clearBreak"></a>
299 <h4>DebugBase.__do_clearBreak</h4> 301 <h4>DebugBase.__do_clearBreak</h4>
300 <b>__do_clearBreak</b>(<i>filename, lineno</i>) 302 <b>__do_clearBreak</b>(<i>filename, lineno</i>)
301
302 <p> 303 <p>
303 Private method called to clear a temporary breakpoint. 304 Private method called to clear a temporary breakpoint.
304 </p> 305 </p>
306
305 <dl> 307 <dl>
306 308
307 <dt><i>filename</i> (str)</dt> 309 <dt><i>filename</i> (str)</dt>
308 <dd> 310 <dd>
309 name of the file the bp belongs to 311 name of the file the bp belongs to
314 </dd> 316 </dd>
315 </dl> 317 </dl>
316 <a NAME="DebugBase.__do_clearWatch" ID="DebugBase.__do_clearWatch"></a> 318 <a NAME="DebugBase.__do_clearWatch" ID="DebugBase.__do_clearWatch"></a>
317 <h4>DebugBase.__do_clearWatch</h4> 319 <h4>DebugBase.__do_clearWatch</h4>
318 <b>__do_clearWatch</b>(<i>cond</i>) 320 <b>__do_clearWatch</b>(<i>cond</i>)
319
320 <p> 321 <p>
321 Private method called to clear a temporary watch expression. 322 Private method called to clear a temporary watch expression.
322 </p> 323 </p>
324
323 <dl> 325 <dl>
324 326
325 <dt><i>cond</i> (str)</dt> 327 <dt><i>cond</i> (str)</dt>
326 <dd> 328 <dd>
327 expression of the watch expression to be cleared 329 expression of the watch expression to be cleared
328 </dd> 330 </dd>
329 </dl> 331 </dl>
330 <a NAME="DebugBase.__eventPollTimer" ID="DebugBase.__eventPollTimer"></a> 332 <a NAME="DebugBase.__eventPollTimer" ID="DebugBase.__eventPollTimer"></a>
331 <h4>DebugBase.__eventPollTimer</h4> 333 <h4>DebugBase.__eventPollTimer</h4>
332 <b>__eventPollTimer</b>(<i></i>) 334 <b>__eventPollTimer</b>(<i></i>)
333
334 <p> 335 <p>
335 Private method to set a flag every 0.5 s to check for new messages. 336 Private method to set a flag every 0.5 s to check for new messages.
336 </p> 337 </p>
338
337 <a NAME="DebugBase.__extractExceptionName" ID="DebugBase.__extractExceptionName"></a> 339 <a NAME="DebugBase.__extractExceptionName" ID="DebugBase.__extractExceptionName"></a>
338 <h4>DebugBase.__extractExceptionName</h4> 340 <h4>DebugBase.__extractExceptionName</h4>
339 <b>__extractExceptionName</b>(<i>exctype</i>) 341 <b>__extractExceptionName</b>(<i>exctype</i>)
340
341 <p> 342 <p>
342 Private method to extract the exception name given the exception 343 Private method to extract the exception name given the exception
343 type object. 344 type object.
344 </p> 345 </p>
346
345 <dl> 347 <dl>
346 348
347 <dt><i>exctype</i> (type)</dt> 349 <dt><i>exctype</i> (type)</dt>
348 <dd> 350 <dd>
349 type of the exception 351 type of the exception
362 </dd> 364 </dd>
363 </dl> 365 </dl>
364 <a NAME="DebugBase.__extractSystemExitMessage" ID="DebugBase.__extractSystemExitMessage"></a> 366 <a NAME="DebugBase.__extractSystemExitMessage" ID="DebugBase.__extractSystemExitMessage"></a>
365 <h4>DebugBase.__extractSystemExitMessage</h4> 367 <h4>DebugBase.__extractSystemExitMessage</h4>
366 <b>__extractSystemExitMessage</b>(<i>excinfo</i>) 368 <b>__extractSystemExitMessage</b>(<i>excinfo</i>)
367
368 <p> 369 <p>
369 Private method to get the SystemExit code and message. 370 Private method to get the SystemExit code and message.
370 </p> 371 </p>
372
371 <dl> 373 <dl>
372 374
373 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt> 375 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt>
374 <dd> 376 <dd>
375 details about the SystemExit exception 377 details about the SystemExit exception
388 </dd> 390 </dd>
389 </dl> 391 </dl>
390 <a NAME="DebugBase.__extract_stack" ID="DebugBase.__extract_stack"></a> 392 <a NAME="DebugBase.__extract_stack" ID="DebugBase.__extract_stack"></a>
391 <h4>DebugBase.__extract_stack</h4> 393 <h4>DebugBase.__extract_stack</h4>
392 <b>__extract_stack</b>(<i>exctb</i>) 394 <b>__extract_stack</b>(<i>exctb</i>)
393
394 <p> 395 <p>
395 Private member to return a list of stack frames. 396 Private member to return a list of stack frames.
396 </p> 397 </p>
398
397 <dl> 399 <dl>
398 400
399 <dt><i>exctb</i> (traceback)</dt> 401 <dt><i>exctb</i> (traceback)</dt>
400 <dd> 402 <dd>
401 exception traceback 403 exception traceback
414 </dd> 416 </dd>
415 </dl> 417 </dl>
416 <a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a> 418 <a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a>
417 <h4>DebugBase.__sendCallTrace</h4> 419 <h4>DebugBase.__sendCallTrace</h4>
418 <b>__sendCallTrace</b>(<i>event, fromFrame, toFrame</i>) 420 <b>__sendCallTrace</b>(<i>event, fromFrame, toFrame</i>)
419
420 <p> 421 <p>
421 Private method to send a call/return trace. 422 Private method to send a call/return trace.
422 </p> 423 </p>
424
423 <dl> 425 <dl>
424 426
425 <dt><i>event</i> (str)</dt> 427 <dt><i>event</i> (str)</dt>
426 <dd> 428 <dd>
427 trace event 429 trace event
436 </dd> 438 </dd>
437 </dl> 439 </dl>
438 <a NAME="DebugBase.__skipFrame" ID="DebugBase.__skipFrame"></a> 440 <a NAME="DebugBase.__skipFrame" ID="DebugBase.__skipFrame"></a>
439 <h4>DebugBase.__skipFrame</h4> 441 <h4>DebugBase.__skipFrame</h4>
440 <b>__skipFrame</b>(<i>frame</i>) 442 <b>__skipFrame</b>(<i>frame</i>)
441
442 <p> 443 <p>
443 Private method to filter out debugger files. 444 Private method to filter out debugger files.
444 </p> 445 </p>
445 <p> 446 <p>
446 Tracing is turned off for files that are part of the 447 Tracing is turned off for files that are part of the
447 debugger that are called from the application being debugged. 448 debugger that are called from the application being debugged.
448 </p> 449 </p>
450
449 <dl> 451 <dl>
450 452
451 <dt><i>frame</i> (frame object)</dt> 453 <dt><i>frame</i> (frame object)</dt>
452 <dd> 454 <dd>
453 the frame object 455 the frame object
466 </dd> 468 </dd>
467 </dl> 469 </dl>
468 <a NAME="DebugBase._set_stopinfo" ID="DebugBase._set_stopinfo"></a> 470 <a NAME="DebugBase._set_stopinfo" ID="DebugBase._set_stopinfo"></a>
469 <h4>DebugBase._set_stopinfo</h4> 471 <h4>DebugBase._set_stopinfo</h4>
470 <b>_set_stopinfo</b>(<i>stopframe, returnframe, stoplineno=0</i>) 472 <b>_set_stopinfo</b>(<i>stopframe, returnframe, stoplineno=0</i>)
471
472 <p> 473 <p>
473 Protected method to update the frame pointers. 474 Protected method to update the frame pointers.
474 </p> 475 </p>
476
475 <dl> 477 <dl>
476 478
477 <dt><i>stopframe</i> (frame object)</dt> 479 <dt><i>stopframe</i> (frame object)</dt>
478 <dd> 480 <dd>
479 the frame object where to stop 481 the frame object where to stop
490 </dd> 492 </dd>
491 </dl> 493 </dl>
492 <a NAME="DebugBase.bootstrap" ID="DebugBase.bootstrap"></a> 494 <a NAME="DebugBase.bootstrap" ID="DebugBase.bootstrap"></a>
493 <h4>DebugBase.bootstrap</h4> 495 <h4>DebugBase.bootstrap</h4>
494 <b>bootstrap</b>(<i>target, args, kwargs</i>) 496 <b>bootstrap</b>(<i>target, args, kwargs</i>)
495
496 <p> 497 <p>
497 Public method to bootstrap a thread. 498 Public method to bootstrap a thread.
498 </p> 499 </p>
499 <p> 500 <p>
500 It wraps the call to the user function to enable tracing 501 It wraps the call to the user function to enable tracing
501 before hand. 502 before hand.
502 </p> 503 </p>
504
503 <dl> 505 <dl>
504 506
505 <dt><i>target</i> (function pointer)</dt> 507 <dt><i>target</i> (function pointer)</dt>
506 <dd> 508 <dd>
507 function which is called in the new created thread 509 function which is called in the new created thread
516 </dd> 518 </dd>
517 </dl> 519 </dl>
518 <a NAME="DebugBase.break_here" ID="DebugBase.break_here"></a> 520 <a NAME="DebugBase.break_here" ID="DebugBase.break_here"></a>
519 <h4>DebugBase.break_here</h4> 521 <h4>DebugBase.break_here</h4>
520 <b>break_here</b>(<i>frame</i>) 522 <b>break_here</b>(<i>frame</i>)
521
522 <p> 523 <p>
523 Public method reimplemented from bdb.py to fix the filename from the 524 Public method reimplemented from bdb.py to fix the filename from the
524 frame. 525 frame.
525 </p> 526 </p>
526 <p> 527 <p>
527 See fix_frame_filename for more info. 528 See fix_frame_filename for more info.
528 </p> 529 </p>
530
529 <dl> 531 <dl>
530 532
531 <dt><i>frame</i> (frame object)</dt> 533 <dt><i>frame</i> (frame object)</dt>
532 <dd> 534 <dd>
533 the frame object 535 the frame object
546 </dd> 548 </dd>
547 </dl> 549 </dl>
548 <a NAME="DebugBase.fix_frame_filename" ID="DebugBase.fix_frame_filename"></a> 550 <a NAME="DebugBase.fix_frame_filename" ID="DebugBase.fix_frame_filename"></a>
549 <h4>DebugBase.fix_frame_filename</h4> 551 <h4>DebugBase.fix_frame_filename</h4>
550 <b>fix_frame_filename</b>(<i>frame</i>) 552 <b>fix_frame_filename</b>(<i>frame</i>)
551
552 <p> 553 <p>
553 Public method used to fixup the filename for a given frame. 554 Public method used to fixup the filename for a given frame.
554 </p> 555 </p>
555 <p> 556 <p>
556 The logic employed here is that if a module was loaded 557 The logic employed here is that if a module was loaded
562 pyc is generated. If files are moved from machine to machine 563 pyc is generated. If files are moved from machine to machine
563 this can break debugging as the .pyc will refer to the .py 564 this can break debugging as the .pyc will refer to the .py
564 on the original machine. Another case might be sharing 565 on the original machine. Another case might be sharing
565 code over a network... This logic deals with that. 566 code over a network... This logic deals with that.
566 </p> 567 </p>
568
567 <dl> 569 <dl>
568 570
569 <dt><i>frame</i> (frame object)</dt> 571 <dt><i>frame</i> (frame object)</dt>
570 <dd> 572 <dd>
571 the frame object 573 the frame object
584 </dd> 586 </dd>
585 </dl> 587 </dl>
586 <a NAME="DebugBase.getFrame" ID="DebugBase.getFrame"></a> 588 <a NAME="DebugBase.getFrame" ID="DebugBase.getFrame"></a>
587 <h4>DebugBase.getFrame</h4> 589 <h4>DebugBase.getFrame</h4>
588 <b>getFrame</b>(<i>frmnr=0</i>) 590 <b>getFrame</b>(<i>frmnr=0</i>)
589
590 <p> 591 <p>
591 Public method to return the frame "frmnr" down the stack. 592 Public method to return the frame "frmnr" down the stack.
592 </p> 593 </p>
594
593 <dl> 595 <dl>
594 596
595 <dt><i>frmnr</i> (int)</dt> 597 <dt><i>frmnr</i> (int)</dt>
596 <dd> 598 <dd>
597 distance of frames down the stack. 0 is 599 distance of frames down the stack. 0 is
611 </dd> 613 </dd>
612 </dl> 614 </dl>
613 <a NAME="DebugBase.getFrameLocals" ID="DebugBase.getFrameLocals"></a> 615 <a NAME="DebugBase.getFrameLocals" ID="DebugBase.getFrameLocals"></a>
614 <h4>DebugBase.getFrameLocals</h4> 616 <h4>DebugBase.getFrameLocals</h4>
615 <b>getFrameLocals</b>(<i>frmnr=0</i>) 617 <b>getFrameLocals</b>(<i>frmnr=0</i>)
616
617 <p> 618 <p>
618 Public method to return the locals dictionary of the current frame 619 Public method to return the locals dictionary of the current frame
619 or a frame below. 620 or a frame below.
620 </p> 621 </p>
622
621 <dl> 623 <dl>
622 624
623 <dt><i>frmnr</i> (int)</dt> 625 <dt><i>frmnr</i> (int)</dt>
624 <dd> 626 <dd>
625 distance of frame to get locals dictionary of. 0 is 627 distance of frame to get locals dictionary of. 0 is
639 </dd> 641 </dd>
640 </dl> 642 </dl>
641 <a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a> 643 <a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a>
642 <h4>DebugBase.getStack</h4> 644 <h4>DebugBase.getStack</h4>
643 <b>getStack</b>(<i>frame=None, applyTrace=False</i>) 645 <b>getStack</b>(<i>frame=None, applyTrace=False</i>)
644
645 <p> 646 <p>
646 Public method to get the stack. 647 Public method to get the stack.
647 </p> 648 </p>
649
648 <dl> 650 <dl>
649 651
650 <dt><i>frame</i> (frame object or list)</dt> 652 <dt><i>frame</i> (frame object or list)</dt>
651 <dd> 653 <dd>
652 frame object to inspect 654 frame object to inspect
670 </dd> 672 </dd>
671 </dl> 673 </dl>
672 <a NAME="DebugBase.go" ID="DebugBase.go"></a> 674 <a NAME="DebugBase.go" ID="DebugBase.go"></a>
673 <h4>DebugBase.go</h4> 675 <h4>DebugBase.go</h4>
674 <b>go</b>(<i>special</i>) 676 <b>go</b>(<i>special</i>)
675
676 <p> 677 <p>
677 Public method to resume the thread. 678 Public method to resume the thread.
678 </p> 679 </p>
679 <p> 680 <p>
680 It resumes the thread stopping only at breakpoints or exceptions. 681 It resumes the thread stopping only at breakpoints or exceptions.
681 </p> 682 </p>
683
682 <dl> 684 <dl>
683 685
684 <dt><i>special</i> (bool)</dt> 686 <dt><i>special</i> (bool)</dt>
685 <dd> 687 <dd>
686 flag indicating a special continue operation 688 flag indicating a special continue operation
687 </dd> 689 </dd>
688 </dl> 690 </dl>
689 <a NAME="DebugBase.move_instruction_pointer" ID="DebugBase.move_instruction_pointer"></a> 691 <a NAME="DebugBase.move_instruction_pointer" ID="DebugBase.move_instruction_pointer"></a>
690 <h4>DebugBase.move_instruction_pointer</h4> 692 <h4>DebugBase.move_instruction_pointer</h4>
691 <b>move_instruction_pointer</b>(<i>lineno</i>) 693 <b>move_instruction_pointer</b>(<i>lineno</i>)
692
693 <p> 694 <p>
694 Public method to move the instruction pointer to another line. 695 Public method to move the instruction pointer to another line.
695 </p> 696 </p>
697
696 <dl> 698 <dl>
697 699
698 <dt><i>lineno</i> (int)</dt> 700 <dt><i>lineno</i> (int)</dt>
699 <dd> 701 <dd>
700 new line number 702 new line number
701 </dd> 703 </dd>
702 </dl> 704 </dl>
703 <a NAME="DebugBase.profile" ID="DebugBase.profile"></a> 705 <a NAME="DebugBase.profile" ID="DebugBase.profile"></a>
704 <h4>DebugBase.profile</h4> 706 <h4>DebugBase.profile</h4>
705 <b>profile</b>(<i>frame, event, arg</i>) 707 <b>profile</b>(<i>frame, event, arg</i>)
706
707 <p> 708 <p>
708 Public method used to trace some stuff independent of the debugger 709 Public method used to trace some stuff independent of the debugger
709 trace function. 710 trace function.
710 </p> 711 </p>
712
711 <dl> 713 <dl>
712 714
713 <dt><i>frame</i> (frame object)</dt> 715 <dt><i>frame</i> (frame object)</dt>
714 <dd> 716 <dd>
715 current stack frame 717 current stack frame
724 </dd> 726 </dd>
725 </dl> 727 </dl>
726 <a NAME="DebugBase.profileWithRecursion" ID="DebugBase.profileWithRecursion"></a> 728 <a NAME="DebugBase.profileWithRecursion" ID="DebugBase.profileWithRecursion"></a>
727 <h4>DebugBase.profileWithRecursion</h4> 729 <h4>DebugBase.profileWithRecursion</h4>
728 <b>profileWithRecursion</b>(<i>frame, event, arg</i>) 730 <b>profileWithRecursion</b>(<i>frame, event, arg</i>)
729
730 <p> 731 <p>
731 Public method used to trace some stuff independent of the debugger 732 Public method used to trace some stuff independent of the debugger
732 trace function. 733 trace function.
733 </p> 734 </p>
735
734 <dl> 736 <dl>
735 737
736 <dt><i>frame</i> (frame object)</dt> 738 <dt><i>frame</i> (frame object)</dt>
737 <dd> 739 <dd>
738 current stack frame 740 current stack frame
754 </dd> 756 </dd>
755 </dl> 757 </dl>
756 <a NAME="DebugBase.run" ID="DebugBase.run"></a> 758 <a NAME="DebugBase.run" ID="DebugBase.run"></a>
757 <h4>DebugBase.run</h4> 759 <h4>DebugBase.run</h4>
758 <b>run</b>(<i>cmd, globalsDict=None, localsDict=None, debug=True, closeSession=True</i>) 760 <b>run</b>(<i>cmd, globalsDict=None, localsDict=None, debug=True, closeSession=True</i>)
759
760 <p> 761 <p>
761 Public method to start a given command under debugger control. 762 Public method to start a given command under debugger control.
762 </p> 763 </p>
764
763 <dl> 765 <dl>
764 766
765 <dt><i>cmd</i> (str or CodeType)</dt> 767 <dt><i>cmd</i> (str or CodeType)</dt>
766 <dd> 768 <dd>
767 command / code to execute under debugger control 769 command / code to execute under debugger control
797 </dd> 799 </dd>
798 </dl> 800 </dl>
799 <a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a> 801 <a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a>
800 <h4>DebugBase.setRecursionDepth</h4> 802 <h4>DebugBase.setRecursionDepth</h4>
801 <b>setRecursionDepth</b>(<i>frame</i>) 803 <b>setRecursionDepth</b>(<i>frame</i>)
802
803 <p> 804 <p>
804 Public method to determine the current recursion depth. 805 Public method to determine the current recursion depth.
805 </p> 806 </p>
807
806 <dl> 808 <dl>
807 809
808 <dt><i>frame</i> (frame object)</dt> 810 <dt><i>frame</i> (frame object)</dt>
809 <dd> 811 <dd>
810 The current stack frame. 812 The current stack frame.
811 </dd> 813 </dd>
812 </dl> 814 </dl>
813 <a NAME="DebugBase.set_continue" ID="DebugBase.set_continue"></a> 815 <a NAME="DebugBase.set_continue" ID="DebugBase.set_continue"></a>
814 <h4>DebugBase.set_continue</h4> 816 <h4>DebugBase.set_continue</h4>
815 <b>set_continue</b>(<i>special</i>) 817 <b>set_continue</b>(<i>special</i>)
816
817 <p> 818 <p>
818 Public method to stop only on next breakpoint. 819 Public method to stop only on next breakpoint.
819 </p> 820 </p>
821
820 <dl> 822 <dl>
821 823
822 <dt><i>special</i> (bool)</dt> 824 <dt><i>special</i> (bool)</dt>
823 <dd> 825 <dd>
824 flag indicating a special continue operation 826 flag indicating a special continue operation
825 </dd> 827 </dd>
826 </dl> 828 </dl>
827 <a NAME="DebugBase.set_next" ID="DebugBase.set_next"></a> 829 <a NAME="DebugBase.set_next" ID="DebugBase.set_next"></a>
828 <h4>DebugBase.set_next</h4> 830 <h4>DebugBase.set_next</h4>
829 <b>set_next</b>(<i>frame</i>) 831 <b>set_next</b>(<i>frame</i>)
830
831 <p> 832 <p>
832 Public method to stop on the next line in or below the given frame. 833 Public method to stop on the next line in or below the given frame.
833 </p> 834 </p>
835
834 <dl> 836 <dl>
835 837
836 <dt><i>frame</i> (frame object)</dt> 838 <dt><i>frame</i> (frame object)</dt>
837 <dd> 839 <dd>
838 the frame object 840 the frame object
839 </dd> 841 </dd>
840 </dl> 842 </dl>
841 <a NAME="DebugBase.set_quit" ID="DebugBase.set_quit"></a> 843 <a NAME="DebugBase.set_quit" ID="DebugBase.set_quit"></a>
842 <h4>DebugBase.set_quit</h4> 844 <h4>DebugBase.set_quit</h4>
843 <b>set_quit</b>(<i></i>) 845 <b>set_quit</b>(<i></i>)
844
845 <p> 846 <p>
846 Public method to quit. 847 Public method to quit.
847 </p> 848 </p>
848 <p> 849 <p>
849 Disables the trace functions and resets all frame pointer. 850 Disables the trace functions and resets all frame pointer.
850 </p> 851 </p>
852
851 <a NAME="DebugBase.set_return" ID="DebugBase.set_return"></a> 853 <a NAME="DebugBase.set_return" ID="DebugBase.set_return"></a>
852 <h4>DebugBase.set_return</h4> 854 <h4>DebugBase.set_return</h4>
853 <b>set_return</b>(<i>frame</i>) 855 <b>set_return</b>(<i>frame</i>)
854
855 <p> 856 <p>
856 Public method to stop when returning from the given frame. 857 Public method to stop when returning from the given frame.
857 </p> 858 </p>
859
858 <dl> 860 <dl>
859 861
860 <dt><i>frame</i> (frame object)</dt> 862 <dt><i>frame</i> (frame object)</dt>
861 <dd> 863 <dd>
862 the frame object 864 the frame object
863 </dd> 865 </dd>
864 </dl> 866 </dl>
865 <a NAME="DebugBase.set_step" ID="DebugBase.set_step"></a> 867 <a NAME="DebugBase.set_step" ID="DebugBase.set_step"></a>
866 <h4>DebugBase.set_step</h4> 868 <h4>DebugBase.set_step</h4>
867 <b>set_step</b>(<i></i>) 869 <b>set_step</b>(<i></i>)
868
869 <p> 870 <p>
870 Public method to stop after one line of code. 871 Public method to stop after one line of code.
871 </p> 872 </p>
873
872 <a NAME="DebugBase.set_trace" ID="DebugBase.set_trace"></a> 874 <a NAME="DebugBase.set_trace" ID="DebugBase.set_trace"></a>
873 <h4>DebugBase.set_trace</h4> 875 <h4>DebugBase.set_trace</h4>
874 <b>set_trace</b>(<i>frame=None</i>) 876 <b>set_trace</b>(<i>frame=None</i>)
875
876 <p> 877 <p>
877 Public method to start debugging from 'frame'. 878 Public method to start debugging from 'frame'.
878 </p> 879 </p>
879 <p> 880 <p>
880 If frame is not specified, debugging starts from caller's frame. 881 If frame is not specified, debugging starts from caller's frame.
881 Because of jump optimizations it's not possible to use sys.breakpoint() 882 Because of jump optimizations it's not possible to use sys.breakpoint()
882 as last instruction in a function or method. 883 as last instruction in a function or method.
883 </p> 884 </p>
885
884 <dl> 886 <dl>
885 887
886 <dt><i>frame</i> (frame object)</dt> 888 <dt><i>frame</i> (frame object)</dt>
887 <dd> 889 <dd>
888 frame to start debugging from 890 frame to start debugging from
889 </dd> 891 </dd>
890 </dl> 892 </dl>
891 <a NAME="DebugBase.set_until" ID="DebugBase.set_until"></a> 893 <a NAME="DebugBase.set_until" ID="DebugBase.set_until"></a>
892 <h4>DebugBase.set_until</h4> 894 <h4>DebugBase.set_until</h4>
893 <b>set_until</b>(<i>frame=None, lineno=None</i>) 895 <b>set_until</b>(<i>frame=None, lineno=None</i>)
894
895 <p> 896 <p>
896 Public method to stop when the line with the lineno greater than the 897 Public method to stop when the line with the lineno greater than the
897 current one is reached or when returning from current frame. 898 current one is reached or when returning from current frame.
898 </p> 899 </p>
900
899 <dl> 901 <dl>
900 902
901 <dt><i>frame</i> (frame object)</dt> 903 <dt><i>frame</i> (frame object)</dt>
902 <dd> 904 <dd>
903 reference to the frame object 905 reference to the frame object
908 </dd> 910 </dd>
909 </dl> 911 </dl>
910 <a NAME="DebugBase.step" ID="DebugBase.step"></a> 912 <a NAME="DebugBase.step" ID="DebugBase.step"></a>
911 <h4>DebugBase.step</h4> 913 <h4>DebugBase.step</h4>
912 <b>step</b>(<i>traceMode</i>) 914 <b>step</b>(<i>traceMode</i>)
913
914 <p> 915 <p>
915 Public method to perform a step operation in this thread. 916 Public method to perform a step operation in this thread.
916 </p> 917 </p>
918
917 <dl> 919 <dl>
918 920
919 <dt><i>traceMode</i> (bool)</dt> 921 <dt><i>traceMode</i> (bool)</dt>
920 <dd> 922 <dd>
921 If it is True, then the step is a step into, 923 If it is True, then the step is a step into,
923 </dd> 925 </dd>
924 </dl> 926 </dl>
925 <a NAME="DebugBase.stepOut" ID="DebugBase.stepOut"></a> 927 <a NAME="DebugBase.stepOut" ID="DebugBase.stepOut"></a>
926 <h4>DebugBase.stepOut</h4> 928 <h4>DebugBase.stepOut</h4>
927 <b>stepOut</b>(<i></i>) 929 <b>stepOut</b>(<i></i>)
928
929 <p> 930 <p>
930 Public method to perform a step out of the current call. 931 Public method to perform a step out of the current call.
931 </p> 932 </p>
933
932 <a NAME="DebugBase.stop_here" ID="DebugBase.stop_here"></a> 934 <a NAME="DebugBase.stop_here" ID="DebugBase.stop_here"></a>
933 <h4>DebugBase.stop_here</h4> 935 <h4>DebugBase.stop_here</h4>
934 <b>stop_here</b>(<i>frame</i>) 936 <b>stop_here</b>(<i>frame</i>)
935
936 <p> 937 <p>
937 Public method reimplemented to filter out debugger files. 938 Public method reimplemented to filter out debugger files.
938 </p> 939 </p>
939 <p> 940 <p>
940 Tracing is turned off for files that are part of the 941 Tracing is turned off for files that are part of the
941 debugger that are called from the application being debugged. 942 debugger that are called from the application being debugged.
942 </p> 943 </p>
944
943 <dl> 945 <dl>
944 946
945 <dt><i>frame</i> (frame object)</dt> 947 <dt><i>frame</i> (frame object)</dt>
946 <dd> 948 <dd>
947 the frame object 949 the frame object
960 </dd> 962 </dd>
961 </dl> 963 </dl>
962 <a NAME="DebugBase.storeFrameLocals" ID="DebugBase.storeFrameLocals"></a> 964 <a NAME="DebugBase.storeFrameLocals" ID="DebugBase.storeFrameLocals"></a>
963 <h4>DebugBase.storeFrameLocals</h4> 965 <h4>DebugBase.storeFrameLocals</h4>
964 <b>storeFrameLocals</b>(<i>frmnr=0</i>) 966 <b>storeFrameLocals</b>(<i>frmnr=0</i>)
965
966 <p> 967 <p>
967 Public method to store the locals into the frame, so an access to 968 Public method to store the locals into the frame, so an access to
968 frame.f_locals returns the last data. 969 frame.f_locals returns the last data.
969 </p> 970 </p>
971
970 <dl> 972 <dl>
971 973
972 <dt><i>frmnr</i> (int)</dt> 974 <dt><i>frmnr</i> (int)</dt>
973 <dd> 975 <dd>
974 distance of frame to store locals dictionary to. 0 is 976 distance of frame to store locals dictionary to. 0 is
976 </dd> 978 </dd>
977 </dl> 979 </dl>
978 <a NAME="DebugBase.tracePythonLibs" ID="DebugBase.tracePythonLibs"></a> 980 <a NAME="DebugBase.tracePythonLibs" ID="DebugBase.tracePythonLibs"></a>
979 <h4>DebugBase.tracePythonLibs</h4> 981 <h4>DebugBase.tracePythonLibs</h4>
980 <b>tracePythonLibs</b>(<i>enable</i>) 982 <b>tracePythonLibs</b>(<i>enable</i>)
981
982 <p> 983 <p>
983 Public method to update the settings to trace into Python libraries. 984 Public method to update the settings to trace into Python libraries.
984 </p> 985 </p>
986
985 <dl> 987 <dl>
986 988
987 <dt><i>enable</i> (bool)</dt> 989 <dt><i>enable</i> (bool)</dt>
988 <dd> 990 <dd>
989 flag to debug into Python libraries 991 flag to debug into Python libraries
990 </dd> 992 </dd>
991 </dl> 993 </dl>
992 <a NAME="DebugBase.trace_dispatch" ID="DebugBase.trace_dispatch"></a> 994 <a NAME="DebugBase.trace_dispatch" ID="DebugBase.trace_dispatch"></a>
993 <h4>DebugBase.trace_dispatch</h4> 995 <h4>DebugBase.trace_dispatch</h4>
994 <b>trace_dispatch</b>(<i>frame, event, arg</i>) 996 <b>trace_dispatch</b>(<i>frame, event, arg</i>)
995
996 <p> 997 <p>
997 Public method reimplemented from bdb.py to do some special things. 998 Public method reimplemented from bdb.py to do some special things.
998 </p> 999 </p>
999 <p> 1000 <p>
1000 This specialty is to check the connection to the debug server 1001 This specialty is to check the connection to the debug server
1001 for new events (i.e. new breakpoints) while we are going through 1002 for new events (i.e. new breakpoints) while we are going through
1002 the code. 1003 the code.
1003 </p> 1004 </p>
1005
1004 <dl> 1006 <dl>
1005 1007
1006 <dt><i>frame</i> (frame object)</dt> 1008 <dt><i>frame</i> (frame object)</dt>
1007 <dd> 1009 <dd>
1008 The current stack frame 1010 The current stack frame
1036 </dd> 1038 </dd>
1037 </dl> 1039 </dl>
1038 <a NAME="DebugBase.user_exception" ID="DebugBase.user_exception"></a> 1040 <a NAME="DebugBase.user_exception" ID="DebugBase.user_exception"></a>
1039 <h4>DebugBase.user_exception</h4> 1041 <h4>DebugBase.user_exception</h4>
1040 <b>user_exception</b>(<i>excinfo, unhandled=False</i>) 1042 <b>user_exception</b>(<i>excinfo, unhandled=False</i>)
1041
1042 <p> 1043 <p>
1043 Public method reimplemented to report an exception to the debug server. 1044 Public method reimplemented to report an exception to the debug server.
1044 </p> 1045 </p>
1046
1045 <dl> 1047 <dl>
1046 1048
1047 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt> 1049 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt>
1048 <dd> 1050 <dd>
1049 details about the exception 1051 details about the exception
1054 </dd> 1056 </dd>
1055 </dl> 1057 </dl>
1056 <a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a> 1058 <a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a>
1057 <h4>DebugBase.user_line</h4> 1059 <h4>DebugBase.user_line</h4>
1058 <b>user_line</b>(<i>frame</i>) 1060 <b>user_line</b>(<i>frame</i>)
1059
1060 <p> 1061 <p>
1061 Public method reimplemented to handle the program about to execute a 1062 Public method reimplemented to handle the program about to execute a
1062 particular line. 1063 particular line.
1063 </p> 1064 </p>
1065
1064 <dl> 1066 <dl>
1065 1067
1066 <dt><i>frame</i> (frame object)</dt> 1068 <dt><i>frame</i> (frame object)</dt>
1067 <dd> 1069 <dd>
1068 reference to the frame object 1070 reference to the frame object
1072 <hr /> 1074 <hr />
1073 <hr /> 1075 <hr />
1074 <a NAME="printerr" ID="printerr"></a> 1076 <a NAME="printerr" ID="printerr"></a>
1075 <h2>printerr</h2> 1077 <h2>printerr</h2>
1076 <b>printerr</b>(<i>s</i>) 1078 <b>printerr</b>(<i>s</i>)
1077
1078 <p> 1079 <p>
1079 Module function used for debugging the debug client. 1080 Module function used for debugging the debug client.
1080 </p> 1081 </p>
1082
1081 <dl> 1083 <dl>
1082 1084
1083 <dt><i>s</i> (str)</dt> 1085 <dt><i>s</i> (str)</dt>
1084 <dd> 1086 <dd>
1085 data to be printed 1087 data to be printed
1089 <hr /> 1091 <hr />
1090 <hr /> 1092 <hr />
1091 <a NAME="setRecursionLimit" ID="setRecursionLimit"></a> 1093 <a NAME="setRecursionLimit" ID="setRecursionLimit"></a>
1092 <h2>setRecursionLimit</h2> 1094 <h2>setRecursionLimit</h2>
1093 <b>setRecursionLimit</b>(<i>limit</i>) 1095 <b>setRecursionLimit</b>(<i>limit</i>)
1094
1095 <p> 1096 <p>
1096 Module function to set the recursion limit. 1097 Module function to set the recursion limit.
1097 </p> 1098 </p>
1099
1098 <dl> 1100 <dl>
1099 1101
1100 <dt><i>limit</i> (int)</dt> 1102 <dt><i>limit</i> (int)</dt>
1101 <dd> 1103 <dd>
1102 recursion limit 1104 recursion limit

eric ide

mercurial