28. 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.
- 28.1.
bdb
— Debugger framework - 28.2.
faulthandler
— Dump the Python traceback - 28.3.
pdb
— The Python Debugger - 28.4. The Python Profilers
- 28.5.
timeit
— Measure execution time of small code snippets - 28.6.
trace
— Trace or track Python statement execution - 28.7.
tracemalloc
— Trace memory allocations