Listed in editorial order, grouped by use case. Click a column to re-sort the whole list.
Press / to search. Tap a tag to filter. Click any row for details.
Search and filter
Results
| Row number | Tags | |||||
|---|---|---|---|---|---|---|
pdb-like Debugger 2 projects |
||||||
| 1 | ipdb pdb-like Debugger | 13,650,873 | 1,975 | pdb-like Debugger Debugging Tools Developer Tools | → | |
|
IPython-enabled pdb.
|
||||||
| 2 | pudb pdb-like Debugger | 1,242,268 | 3,247 | pdb-like Debugger Debugging Tools Developer Tools | → | |
|
A full-screen, console-based Python debugger.
|
||||||
Tracing 1 project |
||||||
| 3 | viztracer Tracing | 1,172,010 | 7,751 | Tracing Debugging Tools Developer Tools | → | |
|
A low-overhead tool that traces and visualizes Python code execution.
|
||||||
Profiler 4 projects |
||||||
| 4 | py-spy Profiler | 19,735,381 | 15,533 | Profiler Debugging Tools Developer Tools | → | |
|
A sampling profiler for Python programs. Written in Rust.
|
||||||
| 5 | memray Profiler | 10,763,066 | 15,255 | Profiler Debugging Tools Developer Tools | → | |
|
A memory profiler that tracks allocations in Python code, native extensions, and the interpreter itself.
|
||||||
| 6 | pyinstrument Profiler | 9,629,173 | 8,014 | Profiler Debugging Tools Developer Tools | → | |
|
A statistical wall-clock profiler with low overhead and readable call-tree output.
|
||||||
| 7 | scalene Profiler | 370,966 | 13,521 | Profiler Debugging Tools Developer Tools | → | |
|
A high-performance, high-precision CPU, GPU, and memory profiler for Python.
|
||||||
Others 3 projects |
||||||
| 8 | django-debug-toolbar Others | 8,347,943 | 8,380 | Others Debugging Tools Developer Tools | → | |
|
Display various debug information for Django.
|
||||||
| 9 | icecream Others | 1,313,220 | 10,110 | Others Debugging Tools Developer Tools | → | |
|
Inspect variables, expressions, and program execution with a single, simple function call.
|
||||||
| 10 | flask-debugtoolbar Others | 704,315 | 978 | Others Debugging Tools Developer Tools | → | |
|
A port of the django-debug-toolbar to flask.
|
||||||
No projects match your search or filter.
Try a broader term, or .
Debugging Tools guide
ipdb gives you IPython's debugger, with tab completion, syntax highlighting, and better tracebacks, behind the same interface as pdb. Drop into it with import ipdb; ipdb.set_trace(), or call ipdb.pm() for post-mortem debugging after an exception.
py-spy is a sampling profiler that shows what a program spends its time on without restarting it or modifying its code. It runs outside the profiled process, which makes it safe to use on production code. py-spy record writes a flame graph of a process ID or a command you hand it, and py-spy dump prints the call stack where a program is hung.
PuDB keeps the source, the stack, breakpoints, and variables all visible at once in one full-screen terminal view. Start it from your code with from pudb import set_trace; set_trace(), or run a whole script with python -m pudb my-script.py.
VizTracer records every function's entry and exit time across a whole run, which helps catch sporadic performance issues. Run your script with viztracer my_script.py instead of python, then open the result.json it writes with vizviewer.
Memray tracks allocations in Python code, native extension modules, and the interpreter itself, to find memory leaks and the code behind high memory use. Profiling takes two steps: memray run saves the allocations to a file, then memray flamegraph builds a report from it.
pyinstrument measures wall-clock time, so time spent downloading data, reading files, and talking to databases counts too. Type pyinstrument script.py instead of python script.py, or wrap a block in with pyinstrument.profile():.
Scalene profiles CPU, GPU, and memory line by line and per function. It separates time in Python from time in native code, so you can focus on code you can change. Run scalene run your_prog.py, then scalene view opens the profile in your browser.
Django Debug Toolbar adds panels to your pages for the current request's SQL queries, templates, cache calls, and more. Its setup adds the app, its URLs, and its middleware, and shows the toolbar only to IP addresses in INTERNAL_IPS.
IceCream's ic() prints each expression along with its value. With no arguments, it prints the file, line, and function it runs in. Since ic() returns its arguments, you can wrap an expression in existing code without rewriting the line.
Flask-DebugToolbar is a port of Django Debug Toolbar to Flask. Wrap your app in DebugToolbarExtension(app), and the toolbar shows up in HTML responses while debug mode is on.
Both debuggers also open from the built-in breakpoint(): set the PYTHONBREAKPOINT environment variable to ipdb.set_trace or pudb.set_trace. Among profilers, sampling ones like py-spy, pyinstrument, and Scalene cost much less overhead than tracing ones, while a tracer like VizTracer records every call and gives you more information.
Contribute
Know a project that belongs here?
Tell us what it does and why it stands out.