traceback — Print or retrieve a stack traceback¶ Source code: Lib/traceback.py This module provides a standard interface to extract, format and print stack traces ofPython programs.It is more flexible than the interpreter’s default traceback display, and therefore makesit possible to configure certain aspects of the output. Finally,it contains a utility for capturing enough information about a

これは、なにをしたくて書いたもの?Pythonで、動作しているスレッドのスタックトレースを出力する方法は?ということで。 環境 今回の環境は、こちら。 $python3 -VPython 3.8.10 使う標準ライブラリ 今回の目的は、このあたりを使えば良さそうです。 traceback --- スタックトレースの表示または取得 —Python 3.8.10 ドキュメント sys --- システムパラメータと関数 —Python 3.8.10 ドキュメント threading --- スレッドベースの並列処理 —Python 3.8.10 ドキュメント 以降、これらを使ってちょっと試していきたいと思います。 スタックトレースを出力するコードを埋め込む まずは、スタックトレースを出力したい処理自体の中に、スタックトレースを出力するコードを埋め込んでみます。 thread_dump
1リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く