MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / Tdb

Class Tdb

tools/python-3.11.9-amd64/Lib/bdb.py:864–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

862# -------------------- testing --------------------
863
864class Tdb(Bdb):
865 def user_call(self, frame, args):
866 name = frame.f_code.co_name
867 if not name: name = '???'
868 print('+++ call', name, args)
869 def user_line(self, frame):
870 import linecache
871 name = frame.f_code.co_name
872 if not name: name = '???'
873 fn = self.canonic(frame.f_code.co_filename)
874 line = linecache.getline(fn, frame.f_lineno, frame.f_globals)
875 print('+++', fn, frame.f_lineno, name, ':', line.strip())
876 def user_return(self, frame, retval):
877 print('+++ return', retval)
878 def user_exception(self, frame, exc_stuff):
879 print('+++ exception', exc_stuff)
880 self.set_continue()
881
882def foo(n):
883 print('foo(', n, ')')

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected