Open vitrun opened 1 year ago
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).
Wouldn't it be nice to support hunter-trace -p 123123 -f CUSTOM_FILTER_ACTION.py
?
won't be attached to the terminal of hunter-trace - a different issue
Can we make it attached to hunter-trace, say, by using rpdb?
It could be possible, both ideas. Just need time to implement.
Current trace client is a simple wrapper of
eval
:It works for simple or medium complex situations, such as:
hunter-trace -p 34313 stdlib=False
hunter-trace -p 34313 "hunter.Q(lambda event: event.locals.get(\"msg\") == \"ha\")"
However, it comes short when
import
or customization is required beforehunter.trace
.With due consideration of safety, it should be allowed to eval a whole snippet of codes.