27. 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.
- 27.1.
bdbDebugger framework - 27.2.
faulthandlerDump the Python traceback - 27.3.
pdbThe Python Debugger - 27.4. The Python Profilers
- 27.5.
timeitMeasure execution time of small code snippets - 27.6.
traceTrace or track Python statement execution - 27.7.
tracemallocTrace memory allocations