eric6/Debugger/DebugServer.py

branch
multi_processing
changeset 7374
5401ae8ddaa1
parent 7360
9190402e4505
child 7377
cc920e534ac0
equal deleted inserted replaced
7373:d036d72f457c 7374:5401ae8ddaa1
112 @signal callTraceInfo emitted after the client reported the call trace 112 @signal callTraceInfo emitted after the client reported the call trace
113 data (isCall, fromFile, fromLine, fromFunction, toFile, toLine, 113 data (isCall, fromFile, fromLine, fromFunction, toFile, toLine,
114 toFunction) 114 toFunction)
115 @signal appendStdout(msg) emitted when a passive debug connection is 115 @signal appendStdout(msg) emitted when a passive debug connection is
116 established or lost 116 established or lost
117 @signal clientDebuggerIds(debuggerIds) emitted to give the list of IDs of
118 attached debugger backends
117 """ 119 """
118 clientClearBreak = pyqtSignal(str, int) 120 clientClearBreak = pyqtSignal(str, int)
119 clientClearWatch = pyqtSignal(str) 121 clientClearWatch = pyqtSignal(str)
120 clientGone = pyqtSignal(bool) 122 clientGone = pyqtSignal(bool)
121 clientProcessStdout = pyqtSignal(str) 123 clientProcessStdout = pyqtSignal(str)
138 clientRawInput = pyqtSignal(str, bool) 140 clientRawInput = pyqtSignal(str, bool)
139 clientBanner = pyqtSignal(str, str, str, str) 141 clientBanner = pyqtSignal(str, str, str, str)
140 clientCapabilities = pyqtSignal(int, str, str) 142 clientCapabilities = pyqtSignal(int, str, str)
141 clientCompletionList = pyqtSignal(list, str) 143 clientCompletionList = pyqtSignal(list, str)
142 clientInterpreterChanged = pyqtSignal(str) 144 clientInterpreterChanged = pyqtSignal(str)
145 clientDebuggerIds = pyqtSignal(list)
143 utDiscovered = pyqtSignal(list, str, str) 146 utDiscovered = pyqtSignal(list, str, str)
144 utPrepared = pyqtSignal(int, str, str) 147 utPrepared = pyqtSignal(int, str, str)
145 utStartTest = pyqtSignal(str, str) 148 utStartTest = pyqtSignal(str, str)
146 utStopTest = pyqtSignal() 149 utStopTest = pyqtSignal()
147 utTestFailed = pyqtSignal(str, str, str) 150 utTestFailed = pyqtSignal(str, str, str)
1228 @param s the raw input (string) 1231 @param s the raw input (string)
1229 """ 1232 """
1230 self.debuggerInterface.remoteRawInput(s) 1233 self.debuggerInterface.remoteRawInput(s)
1231 self.clientRawInputSent.emit() 1234 self.clientRawInputSent.emit()
1232 1235
1233 def remoteThreadList(self): 1236 def remoteThreadList(self, debuggerId=""):
1234 """ 1237 """
1235 Public method to request the list of threads from the client. 1238 Public method to request the list of threads from the client.
1236 """ 1239
1237 self.debuggerInterface.remoteThreadList() 1240 @param debuggerId ID of the debugger backend
1238 1241 @type str
1239 def remoteSetThread(self, tid): 1242 """
1243 self.debuggerInterface.remoteThreadList(debuggerId=debuggerId)
1244
1245 def remoteSetThread(self, tid, debuggerId=""):
1240 """ 1246 """
1241 Public method to request to set the given thread as current thread. 1247 Public method to request to set the given thread as current thread.
1242 1248
1243 @param tid id of the thread (integer) 1249 @param tid id of the thread
1244 """ 1250 @type int
1245 self.debuggerInterface.remoteSetThread(tid) 1251 @param debuggerId ID of the debugger backend
1246 1252 @type str
1247 def remoteClientVariables(self, scope, filterList, framenr=0): 1253 """
1254 self.debuggerInterface.remoteSetThread(tid, debuggerId=debuggerId)
1255
1256 def remoteClientStack(self, debuggerId=""):
1257 """
1258 Public method to request the stack of the main thread.
1259
1260 @param debuggerId ID of the debugger backend
1261 @type str
1262 """
1263 self.debuggerInterface.remoteClientStack(debuggerId=debuggerId)
1264
1265 def remoteClientVariables(self, scope, filterList, framenr=0,
1266 debuggerId=""):
1248 """ 1267 """
1249 Public method to request the variables of the debugged program. 1268 Public method to request the variables of the debugged program.
1250 1269
1251 @param scope the scope of the variables (0 = local, 1 = global) 1270 @param scope the scope of the variables (0 = local, 1 = global)
1252 @param filterList list of variable types to filter out (list of int) 1271 @type int
1253 @param framenr framenumber of the variables to retrieve (int) 1272 @param filterList list of variable types to filter out
1273 @type list of int
1274 @param framenr framenumber of the variables to retrieve
1275 @type int
1276 @param debuggerId ID of the debugger backend
1277 @type str
1254 """ 1278 """
1255 self.debuggerInterface.remoteClientVariables( 1279 self.debuggerInterface.remoteClientVariables(
1256 scope, filterList, framenr, self.__maxVariableSize) 1280 scope, filterList, framenr, self.__maxVariableSize,
1281 debuggerId=debuggerId)
1257 1282
1258 def remoteClientVariable(self, scope, filterList, var, framenr=0): 1283 def remoteClientVariable(self, scope, filterList, var, framenr=0):
1259 """ 1284 """
1260 Public method to request the variables of the debugged program. 1285 Public method to request the variables of the debugged program.
1261 1286
1678 @param toFunction name of the target function (string) 1703 @param toFunction name of the target function (string)
1679 """ 1704 """
1680 self.callTraceInfo.emit( 1705 self.callTraceInfo.emit(
1681 isCall, fromFile, fromLine, fromFunction, 1706 isCall, fromFile, fromLine, fromFunction,
1682 toFile, toLine, toFunction) 1707 toFile, toLine, toFunction)
1683 1708
1684 def clientUtDiscovered(self, testCases, exceptionType, exceptionValue): 1709 def clientUtDiscovered(self, testCases, exceptionType, exceptionValue):
1685 """ 1710 """
1686 Public method to process the client unittest discover info. 1711 Public method to process the client unittest discover info.
1687 1712
1688 @param testCases list of detected test cases 1713 @param testCases list of detected test cases
1860 1885
1861 @param on flag indicating the new debugging state 1886 @param on flag indicating the new debugging state
1862 @type bool 1887 @type bool
1863 """ 1888 """
1864 self.debugging = on 1889 self.debugging = on
1890
1891 def signalClientDebuggerIds(self, debuggerIds):
1892 """
1893 Public method to signal the receipt of a new debugger ID.
1894
1895 This signal indicates, that a new debugger backend has connected.
1896
1897 @param debuggerIds list of IDs of the connected debugger backends
1898 @type list of str
1899 """
1900 self.clientDebuggerIds.emit(debuggerIds)
1901
1902 def getDebuggerIds(self):
1903 """
1904 Public method to return the IDs of the connected debugger backends.
1905
1906 @return list of connected debugger backend IDs
1907 @rtype list of str
1908 """
1909 if self.debuggerInterface:
1910 return self.debuggerInterface.getDebuggerIds()
1911 else:
1912 return []

eric ide

mercurial