Python faulthandler Module
Example
Import faulthandler and confirm it is available (no crashes triggered):
Definition and Usage
The faulthandler module dumps Python tracebacks explicitly, on a crash, or on a timeout.
Use it to debug hard faults or deadlocks by printing the stacks of all threads.
Members
Member | Description |
---|---|
disable() | Disable fault handlers. |
dump_traceback() | Dump the traceback of the current thread. |
dump_traceback_later() | Dump tracebacks after a timeout in a background thread. |
enable() | Enable fault handlers. |
cancel_dump_traceback_later() | Cancel a pending dump started with dump_traceback_later() . |
is_enabled() | Return whether faulthandler is enabled. |