A TUI frontend for pdb
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nicerpdb-0.4.0.tar.gz.
File metadata
- Download URL: nicerpdb-0.4.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaee061213d0e52e284b7943029421ec6b5b9e6c73908532c41d454fe4c8a422
|
|
| MD5 |
fa29e5f9d7d3915309337578879b0f4b
|
|
| BLAKE2b-256 |
266323dae85d93fff8b562572f7a41dff23e5e8db614eff43391199e13da5e03
|
Provenance
The following attestation bundles were made for nicerpdb-0.4.0.tar.gz:
Publisher:
publish-to-pypi.yml on Hedwyn/nicerpdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nicerpdb-0.4.0.tar.gz -
Subject digest:
aaee061213d0e52e284b7943029421ec6b5b9e6c73908532c41d454fe4c8a422 - Sigstore transparency entry: 804563965
- Sigstore integration time:
-
Permalink:
Hedwyn/nicerpdb@a920c75f1553f0418f33669241f20d2ff6195dc3 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/Hedwyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a920c75f1553f0418f33669241f20d2ff6195dc3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nicerpdb-0.4.0-py3-none-any.whl.
File metadata
- Download URL: nicerpdb-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c42548f553a3ea9a13a9820c816b50c28ba8a056ae8c23d35c54e3f963d6a05
|
|
| MD5 |
71f998794a4bc69bfd28898eb9107183
|
|
| BLAKE2b-256 |
6f8665d92866ee726dba35fddaa26b9254a8eacae01b173124b3e6098600ce42
|
Provenance
The following attestation bundles were made for nicerpdb-0.4.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on Hedwyn/nicerpdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nicerpdb-0.4.0-py3-none-any.whl -
Subject digest:
1c42548f553a3ea9a13a9820c816b50c28ba8a056ae8c23d35c54e3f963d6a05 - Sigstore transparency entry: 804563970
- Sigstore integration time:
-
Permalink:
Hedwyn/nicerpdb@a920c75f1553f0418f33669241f20d2ff6195dc3 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/Hedwyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a920c75f1553f0418f33669241f20d2ff6195dc3 -
Trigger Event:
push
-
Statement type: