MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / settrace

Function settrace

pydevd.py:2938–3050  ·  view source on GitHub ↗

Sets the tracing function with the pydev debug function and initializes needed facilities. :param host: the user may specify another host, if the debug server is not in the same machine (default is the local host) :param stdout_to_server: when this is true, the stdout is passed to

(
    host=None,
    stdout_to_server=False,
    stderr_to_server=False,
    port=5678,
    suspend=True,
    trace_only_current_thread=False,
    overwrite_prev_trace=False,  # Deprecated
    patch_multiprocessing=False,
    stop_at_frame=None,
    block_until_connected=True,
    wait_for_ready_to_run=True,
    dont_trace_start_patterns=(),
    dont_trace_end_patterns=(),
    access_token=None,
    client_access_token=None,
    notify_stdin=True,
    protocol=None,
    ppid=0,
    **kwargs,
)

Source from the content-addressed store, hash-verified

2936# settrace
2937# =======================================================================================================================
2938def settrace(
2939 host=None,
2940 stdout_to_server=False,
2941 stderr_to_server=False,
2942 port=5678,
2943 suspend=True,
2944 trace_only_current_thread=False,
2945 overwrite_prev_trace=False, # Deprecated
2946 patch_multiprocessing=False,
2947 stop_at_frame=None,
2948 block_until_connected=True,
2949 wait_for_ready_to_run=True,
2950 dont_trace_start_patterns=(),
2951 dont_trace_end_patterns=(),
2952 access_token=None,
2953 client_access_token=None,
2954 notify_stdin=True,
2955 protocol=None,
2956 ppid=0,
2957 **kwargs,
2958):
2959 """Sets the tracing function with the pydev debug function and initializes needed facilities.
2960
2961 :param host: the user may specify another host, if the debug server is not in the same machine (default is the local
2962 host)
2963
2964 :param stdout_to_server: when this is true, the stdout is passed to the debug server
2965
2966 :param stderr_to_server: when this is true, the stderr is passed to the debug server
2967 so that they are printed in its console and not in this process console.
2968
2969 :param port: specifies which port to use for communicating with the server (note that the server must be started
2970 in the same port). @note: currently it's hard-coded at 5678 in the client
2971
2972 :param suspend: whether a breakpoint should be emulated as soon as this function is called.
2973
2974 :param trace_only_current_thread: determines if only the current thread will be traced or all current and future
2975 threads will also have the tracing enabled.
2976
2977 :param overwrite_prev_trace: deprecated
2978
2979 :param patch_multiprocessing: if True we'll patch the functions which create new processes so that launched
2980 processes are debugged.
2981
2982 :param stop_at_frame: if passed it'll stop at the given frame, otherwise it'll stop in the function which
2983 called this method.
2984
2985 :param wait_for_ready_to_run: if True settrace will block until the ready_to_run flag is set to True,
2986 otherwise, it'll set ready_to_run to True and this function won't block.
2987
2988 Note that if wait_for_ready_to_run == False, there are no guarantees that the debugger is synchronized
2989 with what's configured in the client (IDE), the only guarantee is that when leaving this function
2990 the debugger will be already connected.
2991
2992 :param dont_trace_start_patterns: if set, then any path that starts with one fo the patterns in the collection
2993 will not be traced
2994
2995 :param dont_trace_end_patterns: if set, then any path that ends with one fo the patterns in the collection

Callers 3

pydevd_breakpointhookFunction · 0.85
_enable_attachFunction · 0.85
settrace_forkedFunction · 0.85

Calls 2

_locked_settraceFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected