Example #1
0
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)
Example #2
0
    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
Example #3
0
    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
Example #4
0
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 _on_forked_process():
    import pydevd
    pydevd.threadingCurrentThread().__pydevd_main_thread = True
    pydevd.settrace_forked()
Example #7
0
 def _debugger_break(self):
     t = pydevd.threadingCurrentThread()
     debugger = GetGlobalDebugger()
     debugger.setSuspend(t, CMD_SET_BREAK)
 def _debugger_break(self):
     t = pydevd.threadingCurrentThread()
     debugger = GetGlobalDebugger()
     debugger.setSuspend(t, CMD_SET_BREAK)