--- a/src/eric7/DebugClients/Python/DebugBase.py Tue Oct 31 09:24:27 2023 +0100 +++ b/src/eric7/DebugClients/Python/DebugBase.py Thu Nov 02 11:26:51 2023 +0100 @@ -168,16 +168,17 @@ @param frmnr distance of frame to store locals dictionary to. 0 is the current frame (int) """ - cf = self.frameList[frmnr] + with contextlib.suppress(IndexError): + cf = self.frameList[frmnr] - with contextlib.suppress(ImportError, AttributeError): - if "__pypy__" in sys.builtin_module_names: - import __pypy__ # __IGNORE_WARNING_I10__ + with contextlib.suppress(ImportError, AttributeError): + if "__pypy__" in sys.builtin_module_names: + import __pypy__ # __IGNORE_WARNING_I10__ - __pypy__.locals_to_fast(cf) - return + __pypy__.locals_to_fast(cf) + return - ctypes.pythonapi.PyFrame_LocalsToFast(ctypes.py_object(cf), ctypes.c_int(0)) + ctypes.pythonapi.PyFrame_LocalsToFast(ctypes.py_object(cf), ctypes.c_int(0)) def step(self, traceMode): """