Navigation
- index
- modules |
- next |
- previous |
- Python »
- 3.16.0a2 documentation »
- The Python standard library »
- Debugging and profiling
- |
- Theme |
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
bdb— Debugger frameworkfaulthandler— Dump the Python tracebackpdb— The Python Debuggerprofiling— Python profilers- Introduction to profiling
- Choosing a profiler
- Quick start
- Understanding profile output
- Legacy compatibility
pstats— Statistics for profilerstimeit— Measure execution time of small code snippetstrace— Trace or track Python statement executiontracemalloc— Trace memory allocations
Previous topic
test — Regression tests package for Python
Next topic
This page
«Navigation
- index
- modules |
- next |
- previous |
- Python »
- 3.16.0a2 documentation »
- The Python standard library »
- Debugging and profiling
- |
- Theme |
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.
The Python Software Foundation is a non-profit corporation. Please donate.
Last updated on Nov 29, 2026 (04:54 UTC). Found a bug?
Created using Sphinx 9.1.1.