MCPcopy Create free account
hub / github.com/RustPython/RustPython / Tdb

Class Tdb

Lib/bdb.py:1177–1193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1175# -------------------- testing --------------------
1176
1177class Tdb(Bdb):
1178 def user_call(self, frame, args):
1179 name = frame.f_code.co_name
1180 if not name: name = '???'
1181 print('+++ call', name, args)
1182 def user_line(self, frame):
1183 import linecache
1184 name = frame.f_code.co_name
1185 if not name: name = '???'
1186 fn = self.canonic(frame.f_code.co_filename)
1187 line = linecache.getline(fn, frame.f_lineno, frame.f_globals)
1188 print('+++', fn, frame.f_lineno, name, ':', line.strip())
1189 def user_return(self, frame, retval):
1190 print('+++ return', retval)
1191 def user_exception(self, frame, exc_stuff):
1192 print('+++ exception', exc_stuff)
1193 self.set_continue()
1194
1195def foo(n):
1196 print('foo(', n, ')')

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected