ID EN
Sys

settrace

Python 3.11

Set the system’s trace function, which allows you to implement a Python source code debugger in Python. The function is thread-specific; for a debugger to support multiple threads, it must register a trace function using settrace() for each thread being debugged or use threading.settrace().

Syntax

PYTHON
sys.settrace(tracefunc)

See Also

settrace() threading.settrace() call_tracing() f_trace_lines False frame dis f_trace_opcodes