MCPcopy Index your code
hub / github.com/python/cpython / Tdb

Class Tdb

Lib/bdb.py:1168–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1166# -------------------- testing --------------------
1167
1168class Tdb(Bdb):
1169 def user_call(self, frame, args):
1170 name = frame.f_code.co_name
1171 if not name: name = '???'
1172 print('+++ call', name, args)
1173 def user_line(self, frame):
1174 import linecache
1175 name = frame.f_code.co_name
1176 if not name: name = '???'
1177 fn = self.canonic(frame.f_code.co_filename)
1178 line = linecache.getline(fn, frame.f_lineno, frame.f_globals)
1179 print('+++', fn, frame.f_lineno, name, ':', line.strip())
1180 def user_return(self, frame, retval):
1181 print('+++ return', retval)
1182 def user_exception(self, frame, exc_stuff):
1183 print('+++ exception', exc_stuff)
1184 self.set_continue()
1185
1186def foo(n):
1187 print('foo(', n, ')')

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected