def EnableTracing(trace_level, enable):
    assert trace_level in [ TRACE_STEP, TRACE_INSN, TRACE_FUNC ], \
        "trace_level must be one of TRACE_* constants"

    if trace_level == TRACE_STEP:
        return idaapi.enable_step_trace(enable)

    if trace_level == TRACE_INSN:
        return idaapi.enable_insn_trace(enable)

    if trace_level == TRACE_FUNC:
        return idaapi.enable_func_trace(enable)

    return False
Enable step tracing
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/EnableTracing