Runtime Data Attributes
frame.f_trace
Per-frame trace callback for debugger events. A callback alone does not enable the tracing machinery; setup is implementation-specific and usually uses sys.settrace.
Formal Syntax & Structure
python syntaxpython
frame.f_traceReturn Value
callable | None
Value exposed by this attribute; availability and mutability depend on the owner as described.
Working Example
Example Snippetpython
import inspectdef f(): frame = inspect.currentframe() try: return frame.f_trace is None finally: del frameprint(f())