Open giladbarnea opened 2 years ago
The problem is that birdseye doesn't use sys.settrace
, it modifies the code, and doing that correctly at the last moment before calling a function is somewhere between difficult and impossible.
I suggest you try out https://github.com/alexmojaki/snoop, which is better suited for this kind of thing. You don't even have to choose between snoop and birdseye, you can combine them with @spy
, but setting a depth will only affect the snoop part.
Hi, thanks for birdseye!
I often use it to trace a whole flow, e.g a web request, from endpoint to response. It's especially useful when the flow is complicated and can't be debugged locally.
It can get cumbersome to
@eye
the first function -> run it -> add an@eye
-> run it again -> add the next@eye
-> etc.It would be great if one could e.g
Which would be equivalent to simply decorating
foo
,bar
andbaz
with@eye
.To avoid exploding, maybe a
@deep_eye(trace_limit=10)
option could be supported.I know birdseye can trace whole modules, but more often than not, functions call functions from other modules, so I'm imagining a trace of a call tree that spans different modules.
What are your thoughts?
Thanks, Gilad