eric6/DebugClients/Python/DebugClientBase.py

changeset 7986
2971d5d19951
parent 7973
e836d196e888
child 8030
b356d92d4e02
diff -r 3a1ca2452c30 -r 2971d5d19951 eric6/DebugClients/Python/DebugClientBase.py
--- a/eric6/DebugClients/Python/DebugClientBase.py	Fri Jan 15 19:46:04 2021 +0100
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Fri Jan 15 19:49:36 2021 +0100
@@ -304,7 +304,7 @@
                 lineno = 0
                 charno = 0
             
-            self.sendSyntaxError(message, filename, lineno, charno)
+            self.sendSyntaxError(message, filename, lineno, charno, self.name)
             return None
         
         return code
@@ -339,7 +339,7 @@
         
         elif method == "RequestStack":
             stack = self.mainThread.getStack()
-            self.sendResponseLine(stack)
+            self.sendResponseLine(stack, self.mainThread.name)
         
         elif method == "RequestThreadList":
             self.dumpThreadList()
@@ -359,6 +359,7 @@
                 stack = self.currentThread.getStack()
                 self.sendJsonCommand("ResponseStack", {
                     "stack": stack,
+                    "threadName": self.currentThread.name,
                 })
         
         elif method == "RequestDisassembly":
@@ -1017,15 +1018,18 @@
             "condition": condition,
         })
     
-    def sendResponseLine(self, stack):
+    def sendResponseLine(self, stack, threadName):
         """
         Public method to send the current call stack.
         
         @param stack call stack
         @type list
+        @param threadName name of the thread sending the event
+        @type str
         """
         self.sendJsonCommand("ResponseLine", {
             "stack": stack,
+            "threadName": threadName,
         })
     
     def sendCallTrace(self, event, fromInfo, toInfo):
@@ -1047,7 +1051,8 @@
             "to": toInfo,
         })
     
-    def sendException(self, exceptionType, exceptionMessage, stack):
+    def sendException(self, exceptionType, exceptionMessage, stack,
+                      threadName):
         """
         Public method to send information for an exception.
         
@@ -1057,14 +1062,17 @@
         @type str
         @param stack stack trace information
         @type list
+        @param threadName name of the thread sending the event
+        @type str
         """
         self.sendJsonCommand("ResponseException", {
             "type": exceptionType,
             "message": exceptionMessage,
             "stack": stack,
+            "threadName": threadName,
         })
     
-    def sendSyntaxError(self, message, filename, lineno, charno):
+    def sendSyntaxError(self, message, filename, lineno, charno, threadName):
         """
         Public method to send information for a syntax error.
         
@@ -1076,12 +1084,15 @@
         @type int
         @param charno character number info
         @type int
+        @param threadName name of the thread sending the event
+        @type str
         """
         self.sendJsonCommand("ResponseSyntax", {
             "message": message,
             "filename": filename,
             "linenumber": lineno,
             "characternumber": charno,
+            "threadName": threadName,
         })
     
     def sendPassiveStartup(self, filename, exceptions):

eric ide

mercurial