Set this attribute to True to allow per-opcode events to be requested. Note that this may lead to undefined interpreter behaviour if exceptions raised by the trace function escape to the function being traced.
builtins/frame.f_trace_opcodes
frame.f_trace_opcodes