Skip to main content

NicerPDB

A terminal frontend for Python's pdb debugger, powered by rich.

Install

pip install git+https://github.com/Hedwyn/nicerpdb.git

Features

  • Syntax-highlighted code display
  • Improved variable inspection
  • Enhanced stack traces
  • Pretty-printed expressions

Usage

As an entrypoint

Simply substitute pdb by nicerpdb:

python -m nicerpdb <script_path>

Invoke automatically on breakpoint

If you want nicerpdb to be invoked on a breakpoint() without using it explicitly as entyrypoint, you can set the PYTHONBREAKPOINT environment variable which allows customizing the debugger called on breakpoint:

  • Set it persistently in your current session with:
export PYTHONBREAKPOINT=nicerpdb.set_trace
  • Or for a single command using the usual environement variable syntax:
PYTHONBREAKPOINT=nicerpdb.set_trace python <script_path>

Invoke automatically on test failure with pytest

pytest provides the --pdb option to invoke automatically pdb in post-mortem mode on test failure. nicerpdb provides a pytest plugin to provide the same functionality; replace --pdb by the following flags -p nicerpdb -s (-p loads a pytest plugin, -s disables output capturing so that the debugger can interact with the terminal).

Extensions to PDB

Additional commands

  • l / list: support passing an integer defining the number of lines to show.
  • sh / shell: runs a shell command and display the output within the debugger session. There are a few variants:
    • psh/ prettyshell: uses syntax highlighting on the output.
    • fsh / fshell: allows expanding variables from current Python frame's locals or globals into the shell command. The syntax is %variable_name. Please mind that $ syntax (e.g. $variable_name) is already used for PDB's builtin convenience variables.
    • pfsh / fpsh / fprettyshell: enables all of the above.

Metadata

Release files for nicerpdb 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nicerpdb 0.4.0
File Size Uploaded
nicerpdb-0.4.0.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nicerpdb 0.4.0
File Interpreter ABI Platform
nicerpdb-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / nicerpdb-0.4.0.tar.gz

Download URL nicerpdb-0.4.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aaee061213d0e52e284b7943029421ec6b5b9e6c73908532c41d454fe4c8a422
BLAKE2b-256 checksum
How to use checksums
266323dae85d93fff8b562572f7a41dff23e5e8db614eff43391199e13da5e03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 8, 2026.

Transparency log

Release files / nicerpdb-0.4.0-py3-none-any.whl

Download URL nicerpdb-0.4.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c42548f553a3ea9a13a9820c816b50c28ba8a056ae8c23d35c54e3f963d6a05
BLAKE2b-256 checksum
How to use checksums
6f8665d92866ee726dba35fddaa26b9254a8eacae01b173124b3e6098600ce42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page