![](/img/trans.png)
[英]Print a stack trace to stdout on errors in Django while using IIS
[英]Possible to print the IPDB/Celery-RDB stack trace ('where') to stdout from within the code?
在IPDB或RDB中輸入“ w(here)”將打印出堆棧跟蹤。
有沒有一種方法,而無需輸入set_trace()
?
我猜我在想像是print(w)
,或者簡單地在我set_trace()
的位置打印stacktrace。
traceback.print_stack()
是您想要的,它將從sys._getframe()
開始打印當前的調用堆棧,有關其文檔的更多信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.