eric6/DebugClients/Python/MultiprocessingExtension.py

changeset 7901
6ff7ccf0cb50
parent 7894
4370a8b30648
child 7903
827d89937c30
--- a/eric6/DebugClients/Python/MultiprocessingExtension.py	Sat Dec 19 15:22:26 2020 +0100
+++ b/eric6/DebugClients/Python/MultiprocessingExtension.py	Sat Dec 19 19:57:09 2020 +0100
@@ -49,32 +49,34 @@
             @return exit code of the process
             @rtype int
             """
+            _debugging = False
             if (
                 _debugClient.debugging and
                 _debugClient.multiprocessSupport
             ):
-                try:
-                    (wd, host, port, exceptions, tracePython, redirect,
-                     noencoding) = _debugClient.startOptions[:7]
-                    _debugClient.startDebugger(
-                        sys.argv[0], host=host, port=port,
-                        exceptions=exceptions, tracePython=tracePython,
-                        redirect=redirect, passive=False,
-                        multiprocessSupport=True
-                    )
-                except Exception:
-                    print("Exception during multiprocessing bootstrap init:")
-                    # __IGNORE_WARNING_M801__
-                    traceback.print_exc(file=sys.stdout)
-                    sys.stdout.flush()
-                    raise
+                scriptName = sys.argv[0]
+                if not _debugClient.skipMultiProcessDebugging(scriptName):
+                    _debugging = True
+                    try:
+                        (wd, host, port, exceptions, tracePython, redirect,
+                         noencoding) = _debugClient.startOptions[:7]
+                        _debugClient.startDebugger(
+                            sys.argv[0], host=host, port=port,
+                            exceptions=exceptions, tracePython=tracePython,
+                            redirect=redirect, passive=False,
+                            multiprocessSupport=True
+                        )
+                    except Exception:
+                        print("Exception during multiprocessing bootstrap"
+                              " init:")
+                        # __IGNORE_WARNING_M801__
+                        traceback.print_exc(file=sys.stdout)
+                        sys.stdout.flush()
+                        raise
             
             exitcode = _originalBootstrap(self, *args, **kwargs)
             
-            if (
-                _debugClient.debugging and
-                _debugClient.multiprocessSupport
-            ):
+            if _debugging:
                 _debugClient.progTerminated(exitcode, "process finished")
             
             return exitcode

eric ide

mercurial