You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you may want to see a traceback in the snoop logs when an exception is raised (right?). Some questions to consider:
Should tracebacks sometimes/always show automatically, or only when they've been turned on? Should they be turned on in snoop, install, or both?
Should they show whenever they are raised, or only when they end a call?
Should they show in any traced call, including inner calls that are only traced because of a high depth, or only in functions directly traced with @snoop or with snoop?
Should there be a function to log the traceback manually? This could be used even if there isn't an exception being handled, just to show the current stack. What should it be called?
The text was updated successfully, but these errors were encountered:
Should there be a function to log the traceback manually? This could be used even if there isn't an exception being handled, just to show the current stack. What should it be called?
That would be really useful. I quite often want to see, who called this function. Usually I just add assert False or import traceback; traceback.print_stack() if I don't know to break code execution.
So it would be nice, to have it integrated in snoop. I imagine it to look something like this:
@snoop(stack=True)deffoo(bar):
pass
Or with pp:
deffoo(bar):
pp(bar, stack=True)
Also it would be nice to filter stack trace, by giving list of package names, that you are interested in. For example:
pp(bar, stack=['snoop']
This would only show lines from snoop package, ignoring everything else.
Sometimes you may want to see a traceback in the snoop logs when an exception is raised (right?). Some questions to consider:
snoop
,install
, or both?depth
, or only in functions directly traced with@snoop
orwith snoop
?The text was updated successfully, but these errors were encountered: