eric6/Debugger/DebugUI.py

branch
multi_processing
changeset 7409
1413bfe73d41
parent 7408
0d58e708f57b
child 7410
401791e6f50f
diff -r 0d58e708f57b -r 1413bfe73d41 eric6/Debugger/DebugUI.py
--- a/eric6/Debugger/DebugUI.py	Mon Feb 10 19:49:45 2020 +0100
+++ b/eric6/Debugger/DebugUI.py	Tue Feb 11 18:58:38 2020 +0100
@@ -108,6 +108,9 @@
                 'DebugInfo/ForkAutomatically', False))
         self.forkIntoChild = Preferences.toBool(
             Preferences.Prefs.settings.value('DebugInfo/ForkIntoChild', False))
+        self.enableMultiprocess = Preferences.toBool(
+            Preferences.Prefs.settings.value(
+                'DebugInfo/EnableMultiprocess', False))
         
         self.lastDebuggedFile = None
         self.lastStartAction = 0    # 0=None, 1=Script, 2=Project
@@ -956,6 +959,8 @@
             'DebugInfo/ForkAutomatically', self.forkAutomatically)
         Preferences.Prefs.settings.setValue(
             'DebugInfo/ForkIntoChild', self.forkIntoChild)
+        Preferences.Prefs.settings.setValue(
+            'DebugInfo/EnableMultiprocess', self.enableMultiprocess)
         
     def shutdownServer(self):
         """
@@ -2029,12 +2034,13 @@
             self.envHistory, self.exceptions, self.ui, 0,
             tracePython=self.tracePython, autoClearShell=self.autoClearShell,
             autoContinue=self.autoContinue, autoFork=self.forkAutomatically,
-            forkChild=self.forkIntoChild)
+            forkChild=self.forkIntoChild,
+            enableMultiprocess=self.enableMultiprocess)
         if dlg.exec_() == QDialog.Accepted:
             (lastUsedVenvName, argv, wd, env, exceptions, clearShell,
              console) = dlg.getData()
-            tracePython, autoContinue, forkAutomatically, forkIntoChild = (
-                dlg.getDebugData())
+            (tracePython, autoContinue, forkAutomatically, forkIntoChild,
+             enableMultiprocess) = dlg.getDebugData()
             
             if debugProject:
                 fn = self.project.getMainScript(True)
@@ -2109,6 +2115,9 @@
             self.forkAutomatically = forkAutomatically
             self.forkIntoChild = forkIntoChild
             
+            # Save the multiprocess debugging flag
+            self.enableMultiprocess = enableMultiprocess
+            
             # Hide all error highlights
             self.viewmanager.unhighlight()
             
@@ -2134,7 +2143,8 @@
                     autoContinue=autoContinue, forProject=debugProject,
                     runInConsole=console, autoFork=forkAutomatically,
                     forkChild=forkIntoChild, clientType=self.clientType,
-                    enableCallTrace=enableCallTrace)
+                    enableCallTrace=enableCallTrace,
+                    enableMultiprocess=enableMultiprocess)
                 
                 if (
                     self.debugServer.isClientProcessUp() and
@@ -2219,7 +2229,8 @@
                     autoFork=self.forkAutomatically,
                     forkChild=self.forkIntoChild,
                     clientType=self.clientType,
-                    enableCallTrace=enableCallTrace)
+                    enableCallTrace=enableCallTrace,
+                    enableMultiprocess=self.enableMultiprocess)
                 
                 # Signal that we have started a debugging session
                 self.debuggingStarted.emit(fn)

eric ide

mercurial