eric6/DebugClients/Python/DebugBase.py

changeset 8240
93b8a353c4bf
parent 8228
772103b14c18
child 8257
28146736bbfc
equal deleted inserted replaced
8239:59a9a658618c 8240:93b8a353c4bf
13 import atexit 13 import atexit
14 import inspect 14 import inspect
15 import ctypes 15 import ctypes
16 import time 16 import time
17 import dis 17 import dis
18 import contextlib
18 19
19 from BreakpointWatch import Breakpoint, Watch 20 from BreakpointWatch import Breakpoint, Watch
20 21
21 import _thread 22 import _thread
22 from DebugUtilities import getargvalues, formatargvalues 23 from DebugUtilities import getargvalues, formatargvalues
166 cf = self.currentFrame 167 cf = self.currentFrame
167 while cf is not None and frmnr > 0: 168 while cf is not None and frmnr > 0:
168 cf = cf.f_back 169 cf = cf.f_back
169 frmnr -= 1 170 frmnr -= 1
170 171
171 try: 172 with contextlib.suppress(Exception):
172 if "__pypy__" in sys.builtin_module_names: 173 if "__pypy__" in sys.builtin_module_names:
173 import __pypy__ 174 import __pypy__
174 __pypy__.locals_to_fast(cf) 175 __pypy__.locals_to_fast(cf)
175 return 176 return
176 except Exception: # secok
177 pass
178 177
179 ctypes.pythonapi.PyFrame_LocalsToFast( 178 ctypes.pythonapi.PyFrame_LocalsToFast(
180 ctypes.py_object(cf), 179 ctypes.py_object(cf),
181 ctypes.c_int(0)) 180 ctypes.c_int(0))
182 181

eric ide

mercurial