src/eric7/Debugger/DebuggerInterfacePython.py

branch
eric7
changeset 10417
c6011e501282
parent 10373
093dcebe5ecb
child 10439
21c28b0f9e41
equal deleted inserted replaced
10416:5d807e997391 10417:c6011e501282
788 reportAllExceptions=False, 788 reportAllExceptions=False,
789 ): 789 ):
790 """ 790 """
791 Public method to load a new program to debug. 791 Public method to load a new program to debug.
792 792
793 @param fn the filename to debug 793 @param fn filename to debug
794 @type str 794 @type str
795 @param argv the commandline arguments to pass to the program 795 @param argv list of command line arguments to pass to the program
796 @type str 796 @type list of str
797 @param wd the working directory for the program 797 @param wd working directory for the program
798 @type str 798 @type str
799 @param traceInterpreter flag indicating if the interpreter library 799 @param traceInterpreter flag indicating if the interpreter library
800 should be traced as well 800 should be traced as well
801 @type bool 801 @type bool
802 @param autoContinue flag indicating, that the debugger should not 802 @param autoContinue flag indicating, that the debugger should not
818 self.__sendJsonCommand( 818 self.__sendJsonCommand(
819 "RequestLoad", 819 "RequestLoad",
820 { 820 {
821 "workdir": wd, 821 "workdir": wd,
822 "filename": fn, 822 "filename": fn,
823 "argv": Utilities.parseOptionString(argv), 823 "argv": argv,
824 "traceInterpreter": traceInterpreter, 824 "traceInterpreter": traceInterpreter,
825 "multiprocess": enableMultiprocess, 825 "multiprocess": enableMultiprocess,
826 "reportAllExceptions": reportAllExceptions, 826 "reportAllExceptions": reportAllExceptions,
827 }, 827 },
828 self.__mainDebugger, 828 self.__mainDebugger,
830 830
831 def remoteRun(self, fn, argv, wd): 831 def remoteRun(self, fn, argv, wd):
832 """ 832 """
833 Public method to load a new program to run. 833 Public method to load a new program to run.
834 834
835 @param fn the filename to run 835 @param fn filename to run
836 @type str 836 @type str
837 @param argv the commandline arguments to pass to the program 837 @param argv list of command line arguments to pass to the program
838 @type str 838 @type list of str
839 @param wd the working directory for the program 839 @param wd working directory for the program
840 @type str 840 @type str
841 """ 841 """
842 self.__scriptName = os.path.abspath(fn) 842 self.__scriptName = os.path.abspath(fn)
843 843
844 wd = self.translate(wd, False) 844 wd = self.translate(wd, False)
846 self.__sendJsonCommand( 846 self.__sendJsonCommand(
847 "RequestRun", 847 "RequestRun",
848 { 848 {
849 "workdir": wd, 849 "workdir": wd,
850 "filename": fn, 850 "filename": fn,
851 "argv": Utilities.parseOptionString(argv), 851 "argv": argv,
852 }, 852 },
853 self.__mainDebugger, 853 self.__mainDebugger,
854 ) 854 )
855 855
856 def remoteCoverage(self, fn, argv, wd, erase=False): 856 def remoteCoverage(self, fn, argv, wd, erase=False):
857 """ 857 """
858 Public method to load a new program to collect coverage data. 858 Public method to load a new program to collect coverage data.
859 859
860 @param fn the filename to run 860 @param fn filename to run
861 @type str 861 @type str
862 @param argv the commandline arguments to pass to the program 862 @param argv list of command line arguments to pass to the program
863 @type str 863 @type list of str
864 @param wd the working directory for the program 864 @param wd working directory for the program
865 @type str 865 @type str
866 @param erase flag indicating that coverage info should be 866 @param erase flag indicating that coverage info should be
867 cleared first 867 cleared first
868 @type bool 868 @type bool
869 """ 869 """
874 self.__sendJsonCommand( 874 self.__sendJsonCommand(
875 "RequestCoverage", 875 "RequestCoverage",
876 { 876 {
877 "workdir": wd, 877 "workdir": wd,
878 "filename": fn, 878 "filename": fn,
879 "argv": Utilities.parseOptionString(argv), 879 "argv": argv,
880 "erase": erase, 880 "erase": erase,
881 }, 881 },
882 self.__mainDebugger, 882 self.__mainDebugger,
883 ) 883 )
884 884
885 def remoteProfile(self, fn, argv, wd, erase=False): 885 def remoteProfile(self, fn, argv, wd, erase=False):
886 """ 886 """
887 Public method to load a new program to collect profiling data. 887 Public method to load a new program to collect profiling data.
888 888
889 @param fn the filename to run 889 @param fn filename to run
890 @type str 890 @type str
891 @param argv the commandline arguments to pass to the program 891 @param argv list of command line arguments to pass to the program
892 @type str 892 @type list of str
893 @param wd the working directory for the program 893 @param wd working directory for the program
894 @type str 894 @type str
895 @param erase flag indicating that timing info should be cleared 895 @param erase flag indicating that timing info should be cleared
896 first 896 first
897 @type bool 897 @type bool
898 """ 898 """
903 self.__sendJsonCommand( 903 self.__sendJsonCommand(
904 "RequestProfile", 904 "RequestProfile",
905 { 905 {
906 "workdir": wd, 906 "workdir": wd,
907 "filename": fn, 907 "filename": fn,
908 "argv": Utilities.parseOptionString(argv), 908 "argv": argv,
909 "erase": erase, 909 "erase": erase,
910 }, 910 },
911 self.__mainDebugger, 911 self.__mainDebugger,
912 ) 912 )
913 913
915 """ 915 """
916 Public method to execute a Python statement. 916 Public method to execute a Python statement.
917 917
918 @param debuggerId ID of the debugger backend 918 @param debuggerId ID of the debugger backend
919 @type str 919 @type str
920 @param stmt the Python statement to execute. 920 @param stmt Python statement to execute.
921 @type str 921 @type str
922 """ 922 """
923 self.__sendJsonCommand( 923 self.__sendJsonCommand(
924 "ExecuteStatement", 924 "ExecuteStatement",
925 { 925 {
991 Public method to continue the debugged program to the given line 991 Public method to continue the debugged program to the given line
992 or until returning from the current frame. 992 or until returning from the current frame.
993 993
994 @param debuggerId ID of the debugger backend 994 @param debuggerId ID of the debugger backend
995 @type str 995 @type str
996 @param line the new line, where execution should be continued to 996 @param line new line, where execution should be continued to
997 @type int 997 @type int
998 """ 998 """
999 self.__isStepCommand = False 999 self.__isStepCommand = False
1000 self.__sendJsonCommand( 1000 self.__sendJsonCommand(
1001 "RequestContinueUntil", 1001 "RequestContinueUntil",
1009 """ 1009 """
1010 Public method to move the instruction pointer to a different line. 1010 Public method to move the instruction pointer to a different line.
1011 1011
1012 @param debuggerId ID of the debugger backend 1012 @param debuggerId ID of the debugger backend
1013 @type str 1013 @type str
1014 @param line the new line, where execution should be continued 1014 @param line new line, where execution should be continued
1015 @type int 1015 @type int
1016 """ 1016 """
1017 self.__sendJsonCommand( 1017 self.__sendJsonCommand(
1018 "RequestMoveIP", 1018 "RequestMoveIP",
1019 { 1019 {
1030 1030
1031 @param debuggerId ID of the debugger backend 1031 @param debuggerId ID of the debugger backend
1032 @type str 1032 @type str
1033 @param fn filename the breakpoint belongs to 1033 @param fn filename the breakpoint belongs to
1034 @type str 1034 @type str
1035 @param line linenumber of the breakpoint 1035 @param line line number of the breakpoint
1036 @type int 1036 @type int
1037 @param setBreakpoint flag indicating setting or resetting a breakpoint 1037 @param setBreakpoint flag indicating setting or resetting a breakpoint
1038 @type bool 1038 @type bool
1039 @param cond condition of the breakpoint 1039 @param cond condition of the breakpoint
1040 @type str 1040 @type str
1061 1061
1062 @param debuggerId ID of the debugger backend 1062 @param debuggerId ID of the debugger backend
1063 @type str 1063 @type str
1064 @param fn filename the breakpoint belongs to 1064 @param fn filename the breakpoint belongs to
1065 @type str 1065 @type str
1066 @param line linenumber of the breakpoint 1066 @param line line number of the breakpoint
1067 @type int 1067 @type int
1068 @param enable flag indicating enabling or disabling a breakpoint 1068 @param enable flag indicating enabling or disabling a breakpoint
1069 @type bool 1069 @type bool
1070 """ 1070 """
1071 debuggerList = [debuggerId] if debuggerId else list(self.__connections) 1071 debuggerList = [debuggerId] if debuggerId else list(self.__connections)
1086 1086
1087 @param debuggerId ID of the debugger backend 1087 @param debuggerId ID of the debugger backend
1088 @type str 1088 @type str
1089 @param fn filename the breakpoint belongs to 1089 @param fn filename the breakpoint belongs to
1090 @type str 1090 @type str
1091 @param line linenumber of the breakpoint 1091 @param line line number of the breakpoint
1092 @type int 1092 @type int
1093 @param count number of occurrences to ignore 1093 @param count number of occurrences to ignore
1094 @type int 1094 @type int
1095 """ 1095 """
1096 debuggerList = [debuggerId] if debuggerId else list(self.__connections) 1096 debuggerList = [debuggerId] if debuggerId else list(self.__connections)
1185 """ 1185 """
1186 Public method to send the raw input to the debugged program. 1186 Public method to send the raw input to the debugged program.
1187 1187
1188 @param debuggerId ID of the debugger backend 1188 @param debuggerId ID of the debugger backend
1189 @type str 1189 @type str
1190 @param inputString the raw input 1190 @param inputString raw input
1191 @type str 1191 @type str
1192 """ 1192 """
1193 self.__sendJsonCommand( 1193 self.__sendJsonCommand(
1194 "RawInput", 1194 "RawInput",
1195 { 1195 {
1239 """ 1239 """
1240 Public method to request the variables of the debugged program. 1240 Public method to request the variables of the debugged program.
1241 1241
1242 @param debuggerId ID of the debugger backend 1242 @param debuggerId ID of the debugger backend
1243 @type str 1243 @type str
1244 @param scope the scope of the variables (0 = local, 1 = global) 1244 @param scope scope of the variables (0 = local, 1 = global)
1245 @type int 1245 @type int
1246 @param filterList list of variable types to filter out 1246 @param filterList list of variable types to filter out
1247 @type list of str 1247 @type list of str
1248 @param framenr framenumber of the variables to retrieve 1248 @param framenr framenumber of the variables to retrieve
1249 @type int 1249 @type int
1269 """ 1269 """
1270 Public method to request the variables of the debugged program. 1270 Public method to request the variables of the debugged program.
1271 1271
1272 @param debuggerId ID of the debugger backend 1272 @param debuggerId ID of the debugger backend
1273 @type str 1273 @type str
1274 @param scope the scope of the variables (0 = local, 1 = global) 1274 @param scope scope of the variables (0 = local, 1 = global)
1275 @type int 1275 @type int
1276 @param filterList list of variable types to filter out 1276 @param filterList list of variable types to filter out
1277 @type list of str 1277 @type list of str
1278 @param var list encoded name of variable to retrieve 1278 @param var list encoded name of variable to retrieve
1279 @type list of str 1279 @type list of str
1309 """ 1309 """
1310 Public method to set a variables filter list. 1310 Public method to set a variables filter list.
1311 1311
1312 @param debuggerId ID of the debugger backend 1312 @param debuggerId ID of the debugger backend
1313 @type str 1313 @type str
1314 @param scope the scope of the variables (0 = local, 1 = global) 1314 @param scope scope of the variables (0 = local, 1 = global)
1315 @type int 1315 @type int
1316 @param filterStr regexp string for variable names to filter out 1316 @param filterStr regexp string for variable names to filter out
1317 @type str 1317 @type str
1318 """ 1318 """
1319 self.__sendJsonCommand( 1319 self.__sendJsonCommand(
1382 Public slot to get the a list of possible commandline completions 1382 Public slot to get the a list of possible commandline completions
1383 from the remote client. 1383 from the remote client.
1384 1384
1385 @param debuggerId ID of the debugger backend 1385 @param debuggerId ID of the debugger backend
1386 @type str 1386 @type str
1387 @param text the text to be completed 1387 @param text text to be completed
1388 @type str 1388 @type str
1389 """ 1389 """
1390 self.__sendJsonCommand( 1390 self.__sendJsonCommand(
1391 "RequestCompletion", 1391 "RequestCompletion",
1392 { 1392 {

eric ide

mercurial