Debugging Tools in Python

11 projects in Developer Tools. Most starred: py-spy, memray and scalene.

Python ships with pdb, and the built-in breakpoint() call drops into it. ipdb adds IPython features such as tab completion and syntax highlighting, and PuDB provides a full-screen console interface with variables, stack and source visible at once. icecream replaces print debugging by printing expressions alongside their values and source location.

Profilers answer different questions. py-spy is a sampling profiler written in Rust that attaches to a running process without code changes, which makes it safe for production. pyinstrument shows a readable wall-clock call tree, useful for finding where a request spends its time. Scalene profiles CPU, GPU and memory line by line and separates Python time from native code time. memray tracks memory allocations, including those inside native extensions, and VizTracer records every function call into a timeline you can browse. For web apps, django-debug-toolbar and flask-debugtoolbar show SQL queries and timing per request, and django-silk records them for later inspection.

pdb-like Debugger2

ipdb

IPython-enabled pdb.

2kupdated 7mo ago

pudb

A full-screen, console-based Python debugger.

3.2kupdated 10d ago2026.1

Tracing1

viztracer

A low-overhead tool that traces and visualizes Python code execution.

7.8kupdated 28d ago1.1.1

Profiler4

py-spyRust core

A sampling profiler for Python programs. Written in Rust.

15.6kupdated today0.4.2

memray

Tracks memory allocations in Python code, native extensions, and the interpreter itself.

15.4kupdated 2d ago1.20.0

pyinstrument

A statistical wall-clock profiler with low overhead and readable call-tree output.

8kupdated 12d ago5.1.3

scalene

A high-performance, high-precision CPU, GPU, and memory profiler for Python.

13.5kupdated 1d ago2.4.0

Others4

django-debug-toolbar

Display various debug information for Django.

8.4kupdated 3d ago8.0.0

django-silk

Live profiling and inspection of HTTP requests and database queries for Django.

5kupdated 5d ago5.6.0

icecream

Inspect variables, expressions, and program execution with a single, simple function call.

10.1kupdated 4d ago2.2.0

flask-debugtoolbar

A port of the django-debug-toolbar to flask.

978updated 19d ago0.16.0
Esc

Type to search every entry. ↑↓ to move, Enter to open.