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> |
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>) |
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>) |
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> |
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> |