Registry / testing / pdbr
library0.9.8pypypi✓ verified 24d ago

pdbr is a Python debugging tool that enhances the standard `pdb` (Python Debugger) by integrating the `Rich` library, providing colorful and well-formatted terminal output. It is currently at version 0.9.7 and sees active development with frequent releases addressing compatibility and adding features. It aims to make the debugging experience more visually appealing and user-friendly by leveraging Rich's capabilities for tracebacks, variable inspection, and more.

pip install pdbr
INSTALL
IMPORT
SIG · PDBR
P
pdbr
testingpythonv0.9.8
Install
3.9s avg
Import
1020ms
Disk
76MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 1.069s · 84.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.9s · import 0.971s · 85MB
76MB installed
● package 76MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

set_trace
from pdbr import set_trace
import pdbr; pdbr.set_trace()

This example demonstrates how to insert a breakpoint using `pdbr.set_trace()`. When the `divide` function attempts division by zero, the debugger will be invoked, allowing interactive inspection of variables and program state.

import pdbr def divide(a, b): try: result = a / b except ZeroDivisionError: print("Error: Division by zero detected, entering debugger...") pdbr.set_trace() # Program execution will pause here result = 0 return result if __name__ == "__main__": print(f"10 / 2 = {divide(10, 2)}") print(f"5 / 0 = {divide(5, 0)}") # This call will trigger the debugger
pdbr --version
Debug
Known issues
gotchaWhen using Python's built-in `breakpoint()` function, ensure `pdbr` is imported beforehand, or set the `PYTHONBREAKPOINT` environment variable to `pdbr.set_trace` for `pdbr` to be activated. Otherwise, it will default to the standard `pdb`.
fix
Either `import pdbr` at the beginning of your script, or `os.environ["PYTHONBREAKPOINT"] = "pdbr.set_trace"` before calling `breakpoint()`.
affects: All versions
breakingCompatibility with IPython 9.x series was specifically addressed in `pdbr` version 0.9.2. Older `pdbr` versions may exhibit unexpected behavior or errors when used with IPython 9.x due to changes in IPython's internal architecture, especially regarding color and theme handling.
fix
Upgrade `pdbr` to version 0.9.2 or newer when using IPython 9.x or later: `pip install --upgrade pdbr[ipython]`.
affects: <0.9.2
gotchaConfiguration file locations and parsing for `pdbr` (e.g., for history or context settings) were adjusted in version 0.8.9 to better adhere to `XDG_CONFIG_HOME`. If you have custom configurations, they might need to be relocated or updated.
fix
Consult the `pdbr` documentation for the updated configuration file paths, typically moving to `~/.config/pdbr/` or similar XDG-compliant locations.
affects: <0.8.9
gotchaLike its base `pdb`, `pdbr` does not inherently handle multithreaded applications gracefully. Breakpoints in one thread may interrupt all threads. For more isolated debugging in multithreaded contexts, consider using `pdb.Pdb()` to create an isolated debugger instance and then call `set_trace()` on that specific object.
fix
For specific thread debugging, manually instantiate `pdbr.RichPdb()` for the target thread, then call its `set_trace()` method. Example: `my_debugger = pdbr.RichPdb(); my_debugger.set_trace()`.
affects: All versions
Upgrade
Version history
0.9.8latest on PyPI · released Jul 15, 2026
Audit
Dependencies
richrequiredCore functionality for colored output and enhanced display.
ipythonoptionalEnables advanced features like magics and an improved shell experience within the debugger. Install via `pip install pdbr[ipython]`.
Agent activity
15 hits · last 30 days
node
12
Resources
pdbr — pip install pdbr · libregistry