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

Method localtrace_trace

tools/python-3.11.9-amd64/Lib/trace.py:566–577  ·  view source on GitHub ↗
(self, frame, why, arg)

Source from the content-addressed store, hash-verified

564 return self.localtrace
565
566 def localtrace_trace(self, frame, why, arg):
567 if why == "line":
568 # record the file name and line number of every trace
569 filename = frame.f_code.co_filename
570 lineno = frame.f_lineno
571
572 if self.start_time:
573 print('%.2f' % (_time() - self.start_time), end=' ')
574 bname = os.path.basename(filename)
575 print("%s(%d): %s" % (bname, lineno,
576 linecache.getline(filename, lineno)), end='')
577 return self.localtrace
578
579 def localtrace_count(self, frame, why, arg):
580 if why == "line":

Callers

nothing calls this directly

Calls 3

basenameMethod · 0.80
printFunction · 0.50
getlineMethod · 0.45

Tested by

no test coverage detected