From b851950c26e185d46c16b993d310506992fbdb89 Mon Sep 17 00:00:00 2001 From: NitiKaur Date: Fri, 12 Nov 2021 20:39:56 +0530 Subject: [PATCH] docs/library/sys.rst: Add docs for sys.settrace. --- docs/library/sys.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/library/sys.rst b/docs/library/sys.rst index 24f9e353bb..80ac1ab84c 100644 --- a/docs/library/sys.rst +++ b/docs/library/sys.rst @@ -43,6 +43,15 @@ Functions positional; further arguments are not supported. CPython-compatible ``traceback`` module can be found in `micropython-lib`. +.. function:: settrace(tracefunc) + + Enable tracing of bytecode execution. For details see the `CPython + documentaion `_. + + This function requires a custom MicroPython build as it is typically not + present in pre-built firmware (due to it affecting performance). The relevant + configuration option is *MICROPY_PY_SYS_SETTRACE*. + Constants ---------