Skip to main content

pypi is a proxy for installing pypi (Pdb+).


pdbp (Pdb+)

Pdb+ Advanced Python Console Debugger

pdbp (Pdb+) is an advanced console debugger for Python. It can be used as a drop-in replacement for pdb and pdbpp.

pdbp (Pdb+) makes Python debugging a lot easier (and more fun!)


Installation:

pip install pdbp

Then add import pdbp to an __init__.py of your project, which will automatically make Pdb+ the default debugger at breakpoints:

import pdbp

(If using flake8 for code-linting, you may want to add # noqa to that line):

import pdbp  # noqa

You can also make pdbp the default debugger by setting an environmental variable:

PYTHONBREAKPOINT=pdbp.set_trace

Usage:

To trigger a breakpoint in your code with pytest, add --trace (to start tests with a breakpoint) or --pdb (to trigger a breakpoint if a test fails).

To trigger a breakpoint from a pure python run, use:

python -m pdbp <script.py>

Basic Pdb+ console commands: n, c, s, u, d => next, continue, step, up, down

(To learn more Pdb+ console commands, type help in the Pdb+ console and press Enter/Return.)


pdbp (Pdb+) makes improvements to pdbpp so that it works in all environments. It also includes other bug-fixes. "Sticky" mode is the default option, which shows multiple lines of code while letting you see where you're going (while typing n + Enter).

If you somehow reset pdb to Python's built-in version, you can always replace pdb with pdbp again as the default debugger by running this:

import pdb
import pdbp
for key in pdbp.__dict__.keys():
    pdb.__dict__[key] = pdbp.__dict__[key]

Here's how to customize pdbp/pdb options if you don't like the default settings: (Shown below are the default settings.)

import pdb
if hasattr(pdb, "DefaultConfig"):
    pdb.DefaultConfig.filename_color = pdb.Color.fuchsia
    pdb.DefaultConfig.line_number_color = pdb.Color.turquoise
    pdb.DefaultConfig.truncate_long_lines = False
    pdb.DefaultConfig.sticky_by_default = True

You can also trigger Pdb+ activation like this:

import pdbp
pdbp.set_trace()

pdbp (Pdb+) commands:

Pdb+ commands

Post Mortem Debug Mode:

Pdb+ Post Mortem Debug Mode

The where / w command, which displays the current stack:

Example of the 'where' command

Sticky Mode vs Non-Sticky Mode:

The default mode (sticky) lets you see a lot more lines of code from the debugger when active. In Non-Sticky mode, only one line of code is shown at a time. You can switch between the two modes by typing sticky in the Pdb+ console prompt and pressing Enter/Return.

Sticky Mode:

Pdb+ Stick Mode

Non-Sticky Mode:

Pdb+ Non-Sticky Mode

Tab completion:

Pdb+ Tab Completion

Multi-layer highlighting in the same stack:

Pdb+ Advanced Python Console Debugger

More examples:

Pdb+ is used by packages such as seleniumbase:


Pdb+ Advanced Python Console Debugger

(Pdb+ is maintained by the SeleniumBase Dev Team)

Release files for pdbplus 1.9.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 pdbplus 1.9.0
File Size Uploaded Provenance Actions
pdbplus-1.9.0.tar.gz 10.2 kB Without provenance Details for pdbplus-1.9.0.tar.gz

Built distribution (wheel)

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

Total release size: 18.5 kB

Release files / pdbplus-1.9.0.tar.gz

Download URL pdbplus-1.9.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a2b13efde5c232e82fc3e703615d0a66e0be08665d5a79b2f573abb8ae1effa7
BLAKE2b-256 checksum
How to use checksums
ae09825110cf5fa7a41ac99d2ffa7c16302dda2674d995f8ca8ba37fef756324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / pdbplus-1.9.0-py3-none-any.whl

Download URL pdbplus-1.9.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36e4ce39e2dd3698afe27a2f5ea3dcfe96fe3afc71b08a0fe2769b68357f4a7c
BLAKE2b-256 checksum
How to use checksums
58d4f7fb0418cd2a35f7f7a5d3c8adeee636108df61569efafc36c4a57cf6b16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for pdbplus 1.9.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files No provenance

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