MCPcopy
hub / github.com/scrapy/scrapy / _thread_stacks

Method _thread_stacks

scrapy/extensions/debug.py:61–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 )
60
61 def _thread_stacks(self) -> str:
62 id2name = {th.ident: th.name for th in threading.enumerate()}
63 dumps = ""
64 for id_, frame in sys._current_frames().items():
65 name = id2name.get(id_, "")
66 dump = "".join(traceback.format_stack(frame))
67 dumps += f"# Thread: {name}({id_})\n{dump}\n"
68 return dumps
69
70
71class Debugger:

Callers 1

dump_stacktraceMethod · 0.95

Calls 3

itemsMethod · 0.80
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected