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
However, it comes short when import or customization is required before hunter.trace.
fromhunterimporttrace, Q, DebuggerfrompdbimportPdbtrace(
Q(
# show code that contains "mumbo.jumbo" on the current linelambdaevent: event.locals.get("mumbo") =="jumbo",
# and it's not in Python's stdlibstdlib=False,
# and it contains "mumbo" on the current linesource__contains="mumbo",
action=Debugger(klass=Pdb)
)
)
With due consideration of safety, it should be allowed to eval a whole snippet of codes.
Activity
ionelmc commentedon Sep 27, 2022
Try
hunter-trace -p 123123 'action=hunter.Debugger(klass=__import__("pdb").Pdb)'.Note that Pdb won't work as you expect anyway (won't be attached to the terminal of hunter-trace - a different issue).
vitrun commentedon Sep 28, 2022
Wouldn't it be nice to support
hunter-trace -p 123123 -f CUSTOM_FILTER_ACTION.py?vitrun commentedon Sep 28, 2022
Can we make it attached to hunter-trace, say, by using rpdb?
ionelmc commentedon Sep 29, 2022
It could be possible, both ideas. Just need time to implement.