Continued with the multiprocess debugger. multi_processing

Mon, 03 Feb 2020 19:54:02 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 03 Feb 2020 19:54:02 +0100
branch
multi_processing
changeset 7392
b6674724612a
parent 7390
052ce4cf06c6
child 7394
8e772f275be8

Continued with the multiprocess debugger.

eric6/DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebugServer.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebugUI.py file | annotate | diff | comparison | revisions
eric6/Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
--- a/eric6/DebugClients/Python/DebugClientBase.py	Sun Feb 02 19:29:56 2020 +0100
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Mon Feb 03 19:54:02 2020 +0100
@@ -1487,6 +1487,8 @@
         
         # reset coding
         self.__coding = self.defaultCoding
+        
+        self.sessionClose(False)
 
     def __dumpVariables(self, frmnr, scope, filterList):
         """
--- a/eric6/Debugger/DebugServer.py	Sun Feb 02 19:29:56 2020 +0100
+++ b/eric6/Debugger/DebugServer.py	Mon Feb 03 19:54:02 2020 +0100
@@ -124,7 +124,6 @@
     """
     clientClearBreak = pyqtSignal(str, int, str)
     clientClearWatch = pyqtSignal(str, str)
-    # TODO: check this signal for debuggerId
     clientGone = pyqtSignal(bool)
     clientProcessStdout = pyqtSignal(str)
     clientProcessStderr = pyqtSignal(str)
@@ -148,7 +147,6 @@
     clientBanner = pyqtSignal(str, str, str, str)
     clientCapabilities = pyqtSignal(int, str, str)
     clientCompletionList = pyqtSignal(list, str)
-    # TODO: check this signal for debuggerId
     clientInterpreterChanged = pyqtSignal(str)
     clientDebuggerIds = pyqtSignal(list)
     utDiscovered = pyqtSignal(list, str, str)
@@ -1792,7 +1790,6 @@
         """
         Public method to process the last client exit event.
         """
-        # TODO: Why is this not called anymore?
         if self.passive:
             self.__passiveShutDown()
         self.lastClientExited.emit()
@@ -2075,8 +2072,8 @@
         self.passiveClientExited = False
         self.debugging = True
         self.running = True
-        self.__restoreBreakpoints()
-        self.__restoreWatchpoints()
+        self.__restoreBreakpoints(debuggerId)
+        self.__restoreWatchpoints(debuggerId)
         self.passiveDebugStarted.emit(fn, exc)
     
     def __passiveShutDown(self):
--- a/eric6/Debugger/DebugUI.py	Sun Feb 02 19:29:56 2020 +0100
+++ b/eric6/Debugger/DebugUI.py	Mon Feb 03 19:54:02 2020 +0100
@@ -126,6 +126,7 @@
         debugServer.clientGone.connect(self.__clientGone)
         debugServer.clientLine.connect(self.__clientLine)
         debugServer.clientExit.connect(self.__clientExit)
+        debugServer.lastClientExited.connect(self.__lastClientExited)
         debugServer.clientSyntaxError.connect(self.__clientSyntaxError)
         debugServer.clientException.connect(self.__clientException)
         debugServer.clientSignal.connect(self.__clientSignal)
@@ -1030,10 +1031,6 @@
         @param quiet flag indicating to suppress exit info display
         @type bool
         """
-        self.viewmanager.exit()
-
-        self.__resetUI()
-        
         if not quiet:
             if (
                 not Preferences.getDebugger("SuppressClientExit") or
@@ -1087,7 +1084,14 @@
                             ' {1}.\n{2}\n').format(
                             Utilities.normabspath(self.ui.currentProg), status,
                             info))
-
+    
+    def __lastClientExited(self):
+        """
+        Private slot handling the exit of the last client.
+        """
+        self.viewmanager.exit()
+        self.__resetUI()
+    
     def __clientSyntaxError(self, message, filename, lineNo, characterNo):
         """
         Private method to handle a syntax error in the debugged program.
--- a/eric6/Debugger/DebuggerInterfacePython.py	Sun Feb 02 19:29:56 2020 +0100
+++ b/eric6/Debugger/DebuggerInterfacePython.py	Mon Feb 03 19:54:02 2020 +0100
@@ -563,8 +563,8 @@
                 self.__pendingConnections.remove(sock)
         
         if not self.__connections:
-            # no active connections anymore => restart the backend
-            self.debugServer.startClient()
+            # no active connections anymore
+            self.debugServer.signalLastClientExited()
     
     def getDebuggerIds(self):
         """

eric ide

mercurial