src/eric7/Debugger/DebuggerInterfacePython.py

branch
eric7-maintenance
changeset 10004
983477114d3c
parent 9654
7328efba128b
parent 9972
68ac01294544
child 10079
0222a480e93d
diff -r c2ae0dd2021a -r 983477114d3c src/eric7/Debugger/DebuggerInterfacePython.py
--- a/src/eric7/Debugger/DebuggerInterfacePython.py	Thu Apr 06 09:32:12 2023 +0200
+++ b/src/eric7/Debugger/DebuggerInterfacePython.py	Tue May 02 10:20:02 2023 +0200
@@ -54,7 +54,7 @@
         self.__startedVenv = ""
 
         self.queue = []
-        self.__master = None
+        self.__mainDebugger = None
         self.__connections = {}
         self.__pendingConnections = []
         self.__inShutdown = False
@@ -590,22 +590,22 @@
             self.__connections[debuggerId] = sock
             self.__pendingConnections.remove(sock)
 
-            if self.__master is None:
-                self.__master = debuggerId
+            if self.__mainDebugger is None:
+                self.__mainDebugger = debuggerId
                 # Get the remote clients capabilities
                 self.remoteCapabilities(debuggerId)
 
             self.debugServer.signalClientDebuggerId(debuggerId)
 
-            if debuggerId == self.__master:
+            if debuggerId == self.__mainDebugger:
                 self.__flush()
-                self.debugServer.masterClientConnected()
+                self.debugServer.mainClientConnected()
 
             self.debugServer.initializeClient(debuggerId)
 
-            # perform auto-continue except for master
+            # perform auto-continue except for main
             if (
-                debuggerId != self.__master
+                debuggerId != self.__mainDebugger
                 and self.__autoContinue
                 and not self.__isStepCommand
             ):
@@ -622,8 +622,8 @@
         for debuggerId in self.__connections:
             if self.__connections[debuggerId] is sock:
                 del self.__connections[debuggerId]
-                if debuggerId == self.__master:
-                    self.__master = None
+                if debuggerId == self.__mainDebugger:
+                    self.__mainDebugger = None
                 if debuggerId in self.__autoContinued:
                     self.__autoContinued.remove(debuggerId)
                 if not self.__inShutdown:
@@ -658,10 +658,12 @@
         """
         Private slot to flush the queue.
         """
-        if self.__master:
+        if self.__mainDebugger:
             # Send commands that were waiting for the connection.
             for cmd in self.queue:
-                self.__writeJsonCommandToSocket(cmd, self.__connections[self.__master])
+                self.__writeJsonCommandToSocket(
+                    cmd, self.__connections[self.__mainDebugger]
+                )
 
         self.queue = []
 
@@ -672,7 +674,7 @@
         It closes our sockets and shuts down the debug clients.
         (Needed on Win OS)
         """
-        if not self.__master:
+        if not self.__mainDebugger:
             return
 
         self.__inShutdown = True
@@ -688,7 +690,7 @@
         # reinitialize
         self.queue = []
 
-        self.__master = None
+        self.__mainDebugger = None
 
     def __shutdownSocket(self, sock):
         """
@@ -727,7 +729,7 @@
         @type dict
         """
         self.__sendJsonCommand(
-            "RequestEnvironment", {"environment": env}, self.__master
+            "RequestEnvironment", {"environment": env}, self.__mainDebugger
         )
 
     def remoteLoad(
@@ -773,7 +775,7 @@
                 "traceInterpreter": traceInterpreter,
                 "multiprocess": enableMultiprocess,
             },
-            self.__master,
+            self.__mainDebugger,
         )
 
     def remoteRun(self, fn, argv, wd):
@@ -798,7 +800,7 @@
                 "filename": fn,
                 "argv": Utilities.parseOptionString(argv),
             },
-            self.__master,
+            self.__mainDebugger,
         )
 
     def remoteCoverage(self, fn, argv, wd, erase=False):
@@ -827,7 +829,7 @@
                 "argv": Utilities.parseOptionString(argv),
                 "erase": erase,
             },
-            self.__master,
+            self.__mainDebugger,
         )
 
     def remoteProfile(self, fn, argv, wd, erase=False):
@@ -856,7 +858,7 @@
                 "argv": Utilities.parseOptionString(argv),
                 "erase": erase,
             },
-            self.__master,
+            self.__mainDebugger,
         )
 
     def remoteStatement(self, debuggerId, stmt):
@@ -1460,8 +1462,8 @@
 
         elif method == "ResponseCapabilities":
             self.clientCapabilities = params["capabilities"]
-            if params["debuggerId"] == self.__master:
-                # signal only for the master connection
+            if params["debuggerId"] == self.__mainDebugger:
+                # signal only for the main connection
                 self.debugServer.signalClientCapabilities(
                     params["capabilities"],
                     params["clientType"],
@@ -1469,8 +1471,8 @@
                 )
 
         elif method == "ResponseBanner":
-            if params["debuggerId"] == self.__master:
-                # signal only for the master connection
+            if params["debuggerId"] == self.__mainDebugger:
+                # signal only for the main connection
                 self.debugServer.signalClientBanner(
                     params["version"],
                     params["platform"],
@@ -1561,7 +1563,7 @@
                 params["message"],
                 params["debuggerId"],
             )
-            if params["debuggerId"] == self.__master:
+            if params["debuggerId"] == self.__mainDebugger:
                 self.debugServer.signalMainClientExit()
 
         elif method == "PassiveStartup":
@@ -1599,8 +1601,8 @@
 
         if debuggerId and debuggerId in self.__connections:
             sock = self.__connections[debuggerId]
-        elif sock is None and self.__master is not None:
-            sock = self.__connections[self.__master]
+        elif sock is None and self.__mainDebugger is not None:
+            sock = self.__connections[self.__mainDebugger]
         if sock is not None:
             self.__writeJsonCommandToSocket(cmd, sock)
         else:

eric ide

mercurial