eric7.DebugClients.Python.MultiprocessingExtension
Module implementing a function to patch multiprocessing.Process to support
debugging of the process.
Global Attributes
| _debugClient |
| _originalBootstrap |
| _originalProcess |
Classes
Functions
EricDefaultContext
Class replacing the original 'set_start_method()' method.
This is done in order to prevent a script to be debugged changing the method
to 'forkserver' because the debugger cannot handle this.
Derived from
module.context.DefaultContext
Class Attributes
Class Methods
Methods
Static Methods
EricDefaultContext.get_all_start_methods
get_all_start_methods()
Public method to get a list of supported start methods.
- Return:
-
list of supported start methods
- Return Type:
-
list of str
EricDefaultContext.get_context
get_context(method=None)
Public method to get a context object of the given method.
- method (str | None (optional))
-
start method of the new context (defaults to None)
- Return:
-
created context object
- Return Type:
-
BaseContext
EricDefaultContext.set_start_method
set_start_method(method, force=False)
Public method to set the start method for starting new processes.
- method (str)
-
start method name
- force (bool (optional))
-
flag indicating to set it even if one was set already
(defaults to False)
ProcessWrapper
Wrapper class for multiprocessing.Process.
Derived from
_originalProcess
Class Attributes
Class Methods
Methods
| _bootstrap |
Wrapper around _bootstrap to start debugger. |
Static Methods
ProcessWrapper._bootstrap
_bootstrap(*args, **kwargs)
Wrapper around _bootstrap to start debugger.
- args (list)
-
function arguments
- kwargs (dict)
-
keyword only arguments
- Return:
-
exit code of the process
- Return Type:
-
int
patchMultiprocessing
patchMultiprocessing(module, debugClient)
Function to patch the multiprocessing module.
- module (module)
-
reference to the imported module to be patched
- debugClient (DebugClient)
-
reference to the debug client object