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

branch
maintenance
changeset 8043
0acf98cd089a
parent 7989
a21d673a8f99
child 8215
fc5d68a6889e
equal deleted inserted replaced
7991:866adc8c315b 8043:0acf98cd089a
198 <tr> 198 <tr>
199 <td><a href="#DebugBase.set_trace">set_trace</a></td> 199 <td><a href="#DebugBase.set_trace">set_trace</a></td>
200 <td>Public method to start debugging from 'frame'.</td> 200 <td>Public method to start debugging from 'frame'.</td>
201 </tr> 201 </tr>
202 <tr> 202 <tr>
203 <td><a href="#DebugBase.set_until">set_until</a></td>
204 <td>Public method to stop when the line with the lineno greater than the current one is reached or when returning from current frame.</td>
205 </tr>
206 <tr>
203 <td><a href="#DebugBase.step">step</a></td> 207 <td><a href="#DebugBase.step">step</a></td>
204 <td>Public method to perform a step operation in this thread.</td> 208 <td>Public method to perform a step operation in this thread.</td>
205 </tr> 209 </tr>
206 <tr> 210 <tr>
207 <td><a href="#DebugBase.stepOut">stepOut</a></td> 211 <td><a href="#DebugBase.stepOut">stepOut</a></td>
266 <dd> 270 <dd>
267 the frame object 271 the frame object
268 </dd> 272 </dd>
269 </dl> 273 </dl>
270 <dl> 274 <dl>
271 <dt>Returns:</dt> 275 <dt>Return:</dt>
272 <dd> 276 <dd>
273 Flag indicating a function / method with breakpoint 277 Flag indicating a function / method with breakpoint
274 </dd> 278 </dd>
275 </dl> 279 </dl>
276 <dl> 280 <dl>
292 <dd> 296 <dd>
293 frame object to be disassembled 297 frame object to be disassembled
294 </dd> 298 </dd>
295 </dl> 299 </dl>
296 <dl> 300 <dl>
297 <dt>Returns:</dt> 301 <dt>Return:</dt>
298 <dd> 302 <dd>
299 dictionary containing the disassembly information 303 dictionary containing the disassembly information
300 </dd> 304 </dd>
301 </dl> 305 </dl>
302 <dl> 306 <dl>
358 <dd> 362 <dd>
359 type of the exception 363 type of the exception
360 </dd> 364 </dd>
361 </dl> 365 </dl>
362 <dl> 366 <dl>
363 <dt>Returns:</dt> 367 <dt>Return:</dt>
364 <dd> 368 <dd>
365 exception name (string) 369 exception name (string)
366 </dd> 370 </dd>
367 </dl> 371 </dl>
368 <a NAME="DebugBase.__extractSystemExitMessage" ID="DebugBase.__extractSystemExitMessage"></a> 372 <a NAME="DebugBase.__extractSystemExitMessage" ID="DebugBase.__extractSystemExitMessage"></a>
378 <dd> 382 <dd>
379 details about the SystemExit exception 383 details about the SystemExit exception
380 </dd> 384 </dd>
381 </dl> 385 </dl>
382 <dl> 386 <dl>
383 <dt>Returns:</dt> 387 <dt>Return:</dt>
384 <dd> 388 <dd>
385 SystemExit code and message 389 SystemExit code and message
386 </dd> 390 </dd>
387 </dl> 391 </dl>
388 <dl> 392 <dl>
404 <dd> 408 <dd>
405 exception traceback 409 exception traceback
406 </dd> 410 </dd>
407 </dl> 411 </dl>
408 <dl> 412 <dl>
409 <dt>Returns:</dt> 413 <dt>Return:</dt>
410 <dd> 414 <dd>
411 list of stack frames 415 list of stack frames
412 </dd> 416 </dd>
413 </dl> 417 </dl>
414 <a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a> 418 <a NAME="DebugBase.__sendCallTrace" ID="DebugBase.__sendCallTrace"></a>
450 <dd> 454 <dd>
451 the frame object 455 the frame object
452 </dd> 456 </dd>
453 </dl> 457 </dl>
454 <dl> 458 <dl>
455 <dt>Returns:</dt> 459 <dt>Return:</dt>
456 <dd> 460 <dd>
457 flag indicating whether the debugger should skip this frame 461 flag indicating whether the debugger should skip this frame
458 </dd> 462 </dd>
459 </dl> 463 </dl>
460 <dl> 464 <dl>
463 bool 467 bool
464 </dd> 468 </dd>
465 </dl> 469 </dl>
466 <a NAME="DebugBase._set_stopinfo" ID="DebugBase._set_stopinfo"></a> 470 <a NAME="DebugBase._set_stopinfo" ID="DebugBase._set_stopinfo"></a>
467 <h4>DebugBase._set_stopinfo</h4> 471 <h4>DebugBase._set_stopinfo</h4>
468 <b>_set_stopinfo</b>(<i>stopframe, returnframe</i>) 472 <b>_set_stopinfo</b>(<i>stopframe, returnframe, stoplineno=0</i>)
469 473
470 <p> 474 <p>
471 Protected method to update the frame pointers. 475 Protected method to update the frame pointers.
472 </p> 476 </p>
473 <dl> 477 <dl>
477 the frame object where to stop 481 the frame object where to stop
478 </dd> 482 </dd>
479 <dt><i>returnframe</i> (frame object)</dt> 483 <dt><i>returnframe</i> (frame object)</dt>
480 <dd> 484 <dd>
481 the frame object where to stop on a function return 485 the frame object where to stop on a function return
486 </dd>
487 <dt><i>stoplineno</i> (int)</dt>
488 <dd>
489 line number to stop at. If stoplineno is greater than
490 or equal to 0, then stop at line greater than or equal to the
491 stopline. If stoplineno is -1, then don't stop at all.
482 </dd> 492 </dd>
483 </dl> 493 </dl>
484 <a NAME="DebugBase.bootstrap" ID="DebugBase.bootstrap"></a> 494 <a NAME="DebugBase.bootstrap" ID="DebugBase.bootstrap"></a>
485 <h4>DebugBase.bootstrap</h4> 495 <h4>DebugBase.bootstrap</h4>
486 <b>bootstrap</b>(<i>target, args, kwargs</i>) 496 <b>bootstrap</b>(<i>target, args, kwargs</i>)
524 <dd> 534 <dd>
525 the frame object 535 the frame object
526 </dd> 536 </dd>
527 </dl> 537 </dl>
528 <dl> 538 <dl>
529 <dt>Returns:</dt> 539 <dt>Return:</dt>
530 <dd> 540 <dd>
531 flag indicating the break status 541 flag indicating the break status
532 </dd> 542 </dd>
533 </dl> 543 </dl>
534 <dl> 544 <dl>
562 <dd> 572 <dd>
563 the frame object 573 the frame object
564 </dd> 574 </dd>
565 </dl> 575 </dl>
566 <dl> 576 <dl>
567 <dt>Returns:</dt> 577 <dt>Return:</dt>
568 <dd> 578 <dd>
569 fixed up file name 579 fixed up file name
570 </dd> 580 </dd>
571 </dl> 581 </dl>
572 <dl> 582 <dl>
581 591
582 <p> 592 <p>
583 Public method to return the current frame. 593 Public method to return the current frame.
584 </p> 594 </p>
585 <dl> 595 <dl>
586 <dt>Returns:</dt> 596 <dt>Return:</dt>
587 <dd> 597 <dd>
588 the current frame 598 the current frame
589 </dd> 599 </dd>
590 </dl> 600 </dl>
591 <dl> 601 <dl>
602 Public method to return the locals dictionary of the current frame 612 Public method to return the locals dictionary of the current frame
603 or a frame below. 613 or a frame below.
604 </p> 614 </p>
605 <dl> 615 <dl>
606 616
607 <dt><i>frmnr=</i></dt> 617 <dt><i>frmnr</i></dt>
608 <dd> 618 <dd>
609 distance of frame to get locals dictionary of. 0 is 619 distance of frame to get locals dictionary of. 0 is
610 the current frame (int) 620 the current frame (int)
611 </dd> 621 </dd>
612 </dl> 622 </dl>
613 <dl> 623 <dl>
614 <dt>Returns:</dt> 624 <dt>Return:</dt>
615 <dd> 625 <dd>
616 locals dictionary of the frame 626 locals dictionary of the frame
617 </dd> 627 </dd>
618 </dl> 628 </dl>
619 <a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a> 629 <a NAME="DebugBase.getStack" ID="DebugBase.getStack"></a>
623 <p> 633 <p>
624 Public method to get the stack. 634 Public method to get the stack.
625 </p> 635 </p>
626 <dl> 636 <dl>
627 637
628 <dt><i>frame=</i> (frame object or list)</dt> 638 <dt><i>frame</i> (frame object or list)</dt>
629 <dd> 639 <dd>
630 frame object to inspect 640 frame object to inspect
631 </dd> 641 </dd>
632 <dt><i>applyTrace=</i> (bool)</dt> 642 <dt><i>applyTrace</i> (bool)</dt>
633 <dd> 643 <dd>
634 flag to assign trace function to fr.f_trace 644 flag to assign trace function to fr.f_trace
635 </dd> 645 </dd>
636 </dl> 646 </dl>
637 <dl> 647 <dl>
638 <dt>Returns:</dt> 648 <dt>Return:</dt>
639 <dd> 649 <dd>
640 list of lists with file name (string), line number (integer) 650 list of lists with file name (string), line number (integer)
641 and function name (string) 651 and function name (string)
642 </dd> 652 </dd>
643 </dl> 653 </dl>
725 raised to indicate too many recursions 735 raised to indicate too many recursions
726 </dd> 736 </dd>
727 </dl> 737 </dl>
728 <a NAME="DebugBase.run" ID="DebugBase.run"></a> 738 <a NAME="DebugBase.run" ID="DebugBase.run"></a>
729 <h4>DebugBase.run</h4> 739 <h4>DebugBase.run</h4>
730 <b>run</b>(<i>cmd, globalsDict=None, localsDict=None, debug=True</i>) 740 <b>run</b>(<i>cmd, globalsDict=None, localsDict=None, debug=True, closeSession=True</i>)
731 741
732 <p> 742 <p>
733 Public method to start a given command under debugger control. 743 Public method to start a given command under debugger control.
734 </p> 744 </p>
735 <dl> 745 <dl>
736 746
737 <dt><i>cmd</i> (str or CodeType)</dt> 747 <dt><i>cmd</i> (str or CodeType)</dt>
738 <dd> 748 <dd>
739 command / code to execute under debugger control 749 command / code to execute under debugger control
740 </dd> 750 </dd>
741 <dt><i>globalsDict=</i> (dict)</dt> 751 <dt><i>globalsDict</i> (dict)</dt>
742 <dd> 752 <dd>
743 dictionary of global variables for cmd 753 dictionary of global variables for cmd
744 </dd> 754 </dd>
745 <dt><i>localsDict=</i> (dict)</dt> 755 <dt><i>localsDict</i> (dict)</dt>
746 <dd> 756 <dd>
747 dictionary of local variables for cmd 757 dictionary of local variables for cmd
748 </dd> 758 </dd>
749 <dt><i>debug=</i> (bool)</dt> 759 <dt><i>debug</i> (bool)</dt>
750 <dd> 760 <dd>
751 flag if command should run under debugger control 761 flag if command should run under debugger control
762 </dd>
763 <dt><i>closeSession</i> (bool)</dt>
764 <dd>
765 flag indicating to close the debugger session
766 at exit
767 </dd>
768 </dl>
769 <dl>
770 <dt>Return:</dt>
771 <dd>
772 exit code of the program
773 </dd>
774 </dl>
775 <dl>
776 <dt>Return Type:</dt>
777 <dd>
778 int
752 </dd> 779 </dd>
753 </dl> 780 </dl>
754 <a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a> 781 <a NAME="DebugBase.setRecursionDepth" ID="DebugBase.setRecursionDepth"></a>
755 <h4>DebugBase.setRecursionDepth</h4> 782 <h4>DebugBase.setRecursionDepth</h4>
756 <b>setRecursionDepth</b>(<i>frame</i>) 783 <b>setRecursionDepth</b>(<i>frame</i>)
836 Because of jump optimizations it's not possible to use sys.breakpoint() 863 Because of jump optimizations it's not possible to use sys.breakpoint()
837 as last instruction in a function or method. 864 as last instruction in a function or method.
838 </p> 865 </p>
839 <dl> 866 <dl>
840 867
841 <dt><i>frame=</i> (frame object)</dt> 868 <dt><i>frame</i> (frame object)</dt>
842 <dd> 869 <dd>
843 frame to start debugging from 870 frame to start debugging from
871 </dd>
872 </dl>
873 <a NAME="DebugBase.set_until" ID="DebugBase.set_until"></a>
874 <h4>DebugBase.set_until</h4>
875 <b>set_until</b>(<i>frame=None, lineno=None</i>)
876
877 <p>
878 Public method to stop when the line with the lineno greater than the
879 current one is reached or when returning from current frame.
880 </p>
881 <dl>
882
883 <dt><i>frame</i> (frame object)</dt>
884 <dd>
885 reference to the frame object
886 </dd>
887 <dt><i>lineno</i> (int)</dt>
888 <dd>
889 line number to continue to
844 </dd> 890 </dd>
845 </dl> 891 </dl>
846 <a NAME="DebugBase.step" ID="DebugBase.step"></a> 892 <a NAME="DebugBase.step" ID="DebugBase.step"></a>
847 <h4>DebugBase.step</h4> 893 <h4>DebugBase.step</h4>
848 <b>step</b>(<i>traceMode</i>) 894 <b>step</b>(<i>traceMode</i>)
882 <dd> 928 <dd>
883 the frame object 929 the frame object
884 </dd> 930 </dd>
885 </dl> 931 </dl>
886 <dl> 932 <dl>
887 <dt>Returns:</dt> 933 <dt>Return:</dt>
888 <dd> 934 <dd>
889 flag indicating whether the debugger should stop here 935 flag indicating whether the debugger should stop here
890 </dd> 936 </dd>
891 </dl> 937 </dl>
892 <dl> 938 <dl>
903 Public method to store the locals into the frame, so an access to 949 Public method to store the locals into the frame, so an access to
904 frame.f_locals returns the last data. 950 frame.f_locals returns the last data.
905 </p> 951 </p>
906 <dl> 952 <dl>
907 953
908 <dt><i>frmnr=</i></dt> 954 <dt><i>frmnr</i></dt>
909 <dd> 955 <dd>
910 distance of frame to store locals dictionary to. 0 is 956 distance of frame to store locals dictionary to. 0 is
911 the current frame (int) 957 the current frame (int)
912 </dd> 958 </dd>
913 </dl> 959 </dl>
951 <dd> 997 <dd>
952 The arguments 998 The arguments
953 </dd> 999 </dd>
954 </dl> 1000 </dl>
955 <dl> 1001 <dl>
956 <dt>Returns:</dt> 1002 <dt>Return:</dt>
957 <dd> 1003 <dd>
958 local trace function 1004 local trace function
959 </dd> 1005 </dd>
960 </dl> 1006 </dl>
961 <dl> 1007 <dl>
982 1028
983 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt> 1029 <dt><i>excinfo</i> (tuple(Exception, excval object, traceback frame object))</dt>
984 <dd> 1030 <dd>
985 details about the exception 1031 details about the exception
986 </dd> 1032 </dd>
987 <dt><i>unhandled=</i> (bool)</dt> 1033 <dt><i>unhandled</i> (bool)</dt>
988 <dd> 1034 <dd>
989 flag indicating an uncaught exception 1035 flag indicating an uncaught exception
990 </dd> 1036 </dd>
991 </dl> 1037 </dl>
992 <a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a> 1038 <a NAME="DebugBase.user_line" ID="DebugBase.user_line"></a>

eric ide

mercurial