nuketesting.runner.debugging ============================ .. py:module:: nuketesting.runner.debugging .. autoapi-nested-parse:: Module for handling debugging inside the nuke runner. Attributes ---------- .. autoapisummary:: nuketesting.runner.debugging.DEBUG_ENV_HOST nuketesting.runner.debugging.DEBUG_ENV_PORT nuketesting.runner.debugging.DEBUG_ENV_PYDEVD_SRC Functions --------- .. autoapisummary:: nuketesting.runner.debugging.get_debug_info nuketesting.runner.debugging.try_reconnect_to_debugger Module Contents --------------- .. py:data:: DEBUG_ENV_HOST :value: 'NUKE_RUNNER_DEBUG_HOST' .. py:data:: DEBUG_ENV_PORT :value: 'NUKE_RUNNER_DEBUG_PORT' .. py:data:: DEBUG_ENV_PYDEVD_SRC :value: 'NUKE_RUNNER_DEBUG_PYDEVD_SRC' .. py:function:: get_debug_info() -> dict[str, str] Get the current debugger configuration for adding it to the run environment. .. rubric:: Examples Provide debug information for subprocesses that want to reconnect to the current debugging session: >>> import subprocess >>> env = os.environ.copy() # Don't change the current env >>> env.update(get_debug_info()) >>> subprocess.call("echo test", env=env) .. py:function:: try_reconnect_to_debugger() -> None Try to connect to an active debugging session by using previously stored debug information of the environment. .. rubric:: Notes This method only works together with the `get_debug_info` which collects required information of the debug configuration. This information needs to be available in the environment of the child process so that this method can try to establish a connection.