eric6/Debugger/DebugServer.py

branch
multi_processing
changeset 7377
cc920e534ac0
parent 7374
5401ae8ddaa1
child 7379
72a72fd56494
diff -r 21df384d6150 -r cc920e534ac0 eric6/Debugger/DebugServer.py
--- a/eric6/Debugger/DebugServer.py	Wed Jan 29 19:38:13 2020 +0100
+++ b/eric6/Debugger/DebugServer.py	Thu Jan 30 19:37:03 2020 +0100
@@ -44,12 +44,12 @@
     @signal clientOutput(str) emitted after the client has sent some output
     @signal clientRawInputSent() emitted after the data was sent to the
         debug client
-    @signal clientLine(filename, lineno, forStack) emitted after the
-        debug client has executed a line of code
-    @signal clientStack(stack) emitted after the debug client has executed a
-        line of code
-    @signal clientThreadList(currentId, threadList) emitted after a thread list
-        has been received
+    @signal clientLine(filename, lineno, debuggerId, forStack) emitted after
+        the debug client has executed a line of code
+    @signal clientStack(stack, debuggerId) emitted after the debug client has
+        executed a line of code
+    @signal clientThreadList(currentId, threadList, debuggerId) emitted after
+        a thread list has been received
     @signal clientThreadSet() emitted after the client has acknowledged the
         change of the current thread
     @signal clientVariables(scope, variables) emitted after a variables dump
@@ -124,9 +124,9 @@
     clientProcessStderr = pyqtSignal(str)
     clientRawInputSent = pyqtSignal()
     clientOutput = pyqtSignal(str)
-    clientLine = pyqtSignal(str, int, bool)
-    clientStack = pyqtSignal(list)
-    clientThreadList = pyqtSignal('PyQt_PyObject', list)
+    clientLine = pyqtSignal(str, int, str, bool)
+    clientStack = pyqtSignal(list, str)
+    clientThreadList = pyqtSignal(int, list, str)
     clientThreadSet = pyqtSignal()
     clientVariables = pyqtSignal(int, list)
     clientVariable = pyqtSignal(int, list)
@@ -1462,42 +1462,59 @@
         """
         self.debuggerInterface.remoteUTStop()
         
-    def signalClientOutput(self, line):
+    def signalClientOutput(self, line, debuggerId):
         """
         Public method to process a line of client output.
         
-        @param line client output (string)
+        @param line client output
+        @type str
+        @param debuggerId ID of the debugger backend
+        @type str
         """
-        self.clientOutput.emit(line)
+        if debuggerId:
+            self.clientOutput.emit("{0}: {1}".format(debuggerId, line))
+        else:
+            self.clientOutput.emit(line)
         
-    def signalClientLine(self, filename, lineno, forStack=False):
+    def signalClientLine(self, filename, lineno, debuggerId, forStack=False):
         """
         Public method to process client position feedback.
         
-        @param filename name of the file currently being executed (string)
-        @param lineno line of code currently being executed (integer)
-        @param forStack flag indicating this is for a stack dump (boolean)
+        @param filename name of the file currently being executed
+        @type str
+        @param lineno line of code currently being executed
+        @type int
+        @param debuggerId ID of the debugger backend
+        @type str
+        @param forStack flag indicating this is for a stack dump
+        @type bool
         """
-        self.clientLine.emit(filename, lineno, forStack)
+        self.clientLine.emit(filename, lineno, debuggerId, forStack)
         
-    def signalClientStack(self, stack):
+    def signalClientStack(self, stack, debuggerId):
         """
         Public method to process a client's stack information.
         
         @param stack list of stack entries. Each entry is a tuple of three
             values giving the filename, linenumber and method
-            (list of lists of (string, integer, string))
+        @type list of lists of (string, integer, string)
+        @param debuggerId ID of the debugger backend
+        @type str
         """
-        self.clientStack.emit(stack)
+        self.clientStack.emit(stack, debuggerId)
         
-    def signalClientThreadList(self, currentId, threadList):
+    def signalClientThreadList(self, currentId, threadList, debuggerId):
         """
         Public method to process the client thread list info.
         
-        @param currentId id of the current thread (integer)
+        @param currentId id of the current thread
+        @type int
         @param threadList list of dictionaries containing the thread data
+        @type list of dict
+        @param debuggerId ID of the debugger backend
+        @type str
         """
-        self.clientThreadList.emit(currentId, threadList)
+        self.clientThreadList.emit(currentId, threadList, debuggerId)
         
     def signalClientThreadSet(self):
         """

eric ide

mercurial