526 @type str |
526 @type str |
527 """ |
527 """ |
528 if sock in self.__pendingConnections: |
528 if sock in self.__pendingConnections: |
529 self.__connections[debuggerId] = sock |
529 self.__connections[debuggerId] = sock |
530 self.__pendingConnections.remove(sock) |
530 self.__pendingConnections.remove(sock) |
|
531 |
|
532 self.debugServer.signalClientDebuggerIds( |
|
533 sorted(self.__connections.keys())) |
|
534 |
|
535 def getDebuggerIds(self): |
|
536 """ |
|
537 Public method to return the IDs of the connected debugger backends. |
|
538 |
|
539 @return list of connected debugger backend IDs |
|
540 @rtype list of str |
|
541 """ |
|
542 return sorted(self.__connections.keys()) |
531 |
543 |
532 def flush(self): |
544 def flush(self): |
533 """ |
545 """ |
534 Public slot to flush the queue. |
546 Public slot to flush the queue. |
535 """ |
547 """ |
835 """ |
847 """ |
836 self.__sendJsonCommand("RawInput", { |
848 self.__sendJsonCommand("RawInput", { |
837 "input": s, |
849 "input": s, |
838 }) |
850 }) |
839 |
851 |
840 def remoteThreadList(self): |
852 def remoteThreadList(self, debuggerId=""): |
841 """ |
853 """ |
842 Public method to request the list of threads from the client. |
854 Public method to request the list of threads from the client. |
843 """ |
855 |
844 self.__sendJsonCommand("RequestThreadList", {}) |
856 @param debuggerId ID of the debugger backend |
845 |
857 @type str |
846 def remoteSetThread(self, tid): |
858 """ |
|
859 self.__sendJsonCommand("RequestThreadList", {}, debuggerId=debuggerId) |
|
860 |
|
861 def remoteSetThread(self, tid, debuggerId=""): |
847 """ |
862 """ |
848 Public method to request to set the given thread as current thread. |
863 Public method to request to set the given thread as current thread. |
849 |
864 |
850 @param tid id of the thread (integer) |
865 @param tid id of the thread |
|
866 @type int |
|
867 @param debuggerId ID of the debugger backend |
|
868 @type str |
851 """ |
869 """ |
852 self.__sendJsonCommand("RequestThreadSet", { |
870 self.__sendJsonCommand("RequestThreadSet", { |
853 "threadID": tid, |
871 "threadID": tid, |
854 }) |
872 }, debuggerId=debuggerId) |
855 |
873 |
856 def remoteClientVariables(self, scope, filterList, framenr=0, maxSize=0): |
874 def remoteClientStack(self, debuggerId=""): |
|
875 """ |
|
876 Public method to request the stack of the main thread. |
|
877 |
|
878 @param debuggerId ID of the debugger backend |
|
879 @type str |
|
880 """ |
|
881 self.__sendJsonCommand("RequestStack", {}, debuggerId=debuggerId) |
|
882 |
|
883 def remoteClientVariables(self, scope, filterList, framenr=0, maxSize=0, |
|
884 debuggerId=""): |
857 """ |
885 """ |
858 Public method to request the variables of the debugged program. |
886 Public method to request the variables of the debugged program. |
859 |
887 |
860 @param scope the scope of the variables (0 = local, 1 = global) |
888 @param scope the scope of the variables (0 = local, 1 = global) |
861 @type int |
889 @type int |
865 @type int |
893 @type int |
866 @param maxSize maximum size the formatted value of a variable will |
894 @param maxSize maximum size the formatted value of a variable will |
867 be shown. If it is bigger than that, a 'too big' indication will |
895 be shown. If it is bigger than that, a 'too big' indication will |
868 be given (@@TOO_BIG_TO_SHOW@@). |
896 be given (@@TOO_BIG_TO_SHOW@@). |
869 @type int |
897 @type int |
|
898 @param debuggerId ID of the debugger backend |
|
899 @type str |
870 """ |
900 """ |
871 self.__sendJsonCommand("RequestVariables", { |
901 self.__sendJsonCommand("RequestVariables", { |
872 "frameNumber": framenr, |
902 "frameNumber": framenr, |
873 "scope": scope, |
903 "scope": scope, |
874 "filters": filterList, |
904 "filters": filterList, |
875 "maxSize": maxSize, |
905 "maxSize": maxSize, |
876 }) |
906 }, debuggerId=debuggerId) |
877 |
907 |
878 def remoteClientVariable(self, scope, filterList, var, framenr=0, |
908 def remoteClientVariable(self, scope, filterList, var, framenr=0, |
879 maxSize=0): |
909 maxSize=0): |
880 """ |
910 """ |
881 Public method to request the variables of the debugged program. |
911 Public method to request the variables of the debugged program. |