def _on_forked_process(setup_tracing=True): pydevd_constants.after_fork() pydev_log.initialize_debug_stream(force=True) pydev_log.debug('pydevd on forked process: %s', os.getpid()) import pydevd pydevd.threadingCurrentThread().__pydevd_main_thread = True pydevd.settrace_forked(setup_tracing=setup_tracing)
def new_fork(): import os child_process = getattr(os, original_name)() # fork if not child_process: import pydevd pydevd.threadingCurrentThread().__pydevd_main_thread = True pydevd.settrace_forked() return child_process
def break_into_debugger(): """If a remote debugger is attached, pauses execution of all threads, and breaks into the debugger with current thread as active. """ debugger = get_global_debugger() if not _attached.isSet() or debugger is None: return thread = pydevd.threadingCurrentThread() try: additional_info = thread.additional_info except AttributeError: additional_info = PyDBAdditionalThreadInfo() thread.additional_info = additional_info debugger.set_suspend(thread, CMD_THREAD_SUSPEND)
def _on_forked_process(): import pydevd pydevd.threadingCurrentThread().__pydevd_main_thread = True pydevd.settrace_forked()
def _debugger_break(self): t = pydevd.threadingCurrentThread() debugger = GetGlobalDebugger() debugger.setSuspend(t, CMD_SET_BREAK)