Debugging and profiling
These libraries help you with Python development: the debugger enables you to step through code, analyze stack frames and set breakpoints etc., and the profilers run code and give you a detailed breakdown of execution times, allowing you to identify bottlenecks in your programs. Auditing events provide visibility into runtime behaviors that would otherwise require intrusive debugging or patching.
- Audit events table
bdbDebugger frameworkfaulthandlerDump the Python tracebackpdbThe Python DebuggerprofilingPython profilers- Introduction to profiling
- Choosing a profiler
- Quick start
- Understanding profile output
- Legacy compatibility
pstatsStatistics for profilerstimeitMeasure execution time of small code snippetstraceTrace or track Python statement executiontracemallocTrace memory allocations