Issue
Inputting 'w(here)' into the IPDB or RDB will print out a stack trace.
Is there a way to do this without entering set_trace()
?
I guess what I'm imagining would be something like print(w)
, or otherwise simply printing the stacktrace at the point where I set_trace()
.
Solution
traceback.print_stack()
is what you want, it will print current call stack start from sys._getframe()
, see more on its doc.
Answered By - georgexsh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.