# debug-dojo
**debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal. It leverages [`rich`](https://github.com/Textualize/rich) for beautiful output and offers helpers for side-by-side object comparison, improved tracebacks from `rich`, and easy integration with PuDB. All tools can be installed at once or individually, allowing for flexible debugging setups.
## Features
- **Simple API:** Install all tools or only what you need.
- **PuDB integration:** Quickly enable the PuDB TUI debugger.
- **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.
- **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.
## Installation
```sh
pip install debug-dojo
```
## Usage
### Install all debugging tools
In the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:
```python
import debug_dojo.all; b()
i(object_1) # Inspect an object
c(object_1, object_2) # Compare two objects side-by-side
```
Where:
- `b()` is a builtin-injected function that sets a breakpoint using PuDB's `set_trace()`.
- `i(object_1)` to inspect an object.
- `c(object_1, object_2)` to compare two objects side-by-side.
### Use individual tools
```python
from debug_dojo import install_inspect, use_pudb, use_rich_traceback
install_inspect() # Enable object inspection helpers
use_pudb() # Set up PuDB as the debugger
use_rich_traceback() # Enable Rich tracebacks
```
### Compare objects side-by-side
```python
from debug_dojo.compareres import inspect_objects_side_by_side
a = {"foo": 1, "bar": 2}
b = [1, 2, 3]
inspect_objects_side_by_side(a, b)
```
## Development
### Run tests
```sh
pytest
```
### Lint and type check
```sh
ruff check src/debug_dojo --fix
basedpyright src/debug_dojo
```
## Changelog
## v0.2.0 (2025-07-20)
*release tag*: [v0.2.0](https://github.com/pydantic/pydantic/releases/tag/v2.11.6)
### What's Changed
- Added `dojo` command for easy debugging setup.
- Added `p()` function for rich printing.
- Added history file for tracking changes.
- Moved to `hatch` for building and packaging.
#### Fixes
- Fixed `pyproject.toml` to point to GitHub repository as the homepage.
## v0.1.0 (2025-07-20)
*release tag*: [v0.1.0](https://github.com/pydantic/pydantic/releases/tag/v2.11.6)
### What's Changed
- Initial module to install debugging tools.
- Debug mode utilities for PuDB, rich tracebacks, and object inspection.
#### Fixes
Raw data
{
"_id": null,
"home_page": null,
"name": "debug-dojo",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "debugging, inspection, pudb, rich, tools, traceback",
"author": null,
"author_email": "bwrob <bartosz.marcin.wroblewski@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ba/54/cd3cad97d3492ebebf888394434056aaf66d31ea74c39e5c1c3735e8df7c/debug_dojo-0.2.0.tar.gz",
"platform": null,
"description": "# debug-dojo\n\n**debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal. It leverages [`rich`](https://github.com/Textualize/rich) for beautiful output and offers helpers for side-by-side object comparison, improved tracebacks from `rich`, and easy integration with PuDB. All tools can be installed at once or individually, allowing for flexible debugging setups.\n\n## Features\n\n- **Simple API:** Install all tools or only what you need.\n- **PuDB integration:** Quickly enable the PuDB TUI debugger.\n- **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.\n- **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.\n\n## Installation\n\n```sh\npip install debug-dojo\n```\n\n## Usage\n\n### Install all debugging tools\n\nIn the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:\n\n```python\nimport debug_dojo.all; b()\n\ni(object_1) # Inspect an object\nc(object_1, object_2) # Compare two objects side-by-side\n```\n\nWhere:\n\n- `b()` is a builtin-injected function that sets a breakpoint using PuDB's `set_trace()`.\n- `i(object_1)` to inspect an object.\n- `c(object_1, object_2)` to compare two objects side-by-side.\n\n### Use individual tools\n\n```python\nfrom debug_dojo import install_inspect, use_pudb, use_rich_traceback\n\ninstall_inspect() # Enable object inspection helpers\nuse_pudb() # Set up PuDB as the debugger\nuse_rich_traceback() # Enable Rich tracebacks\n```\n\n### Compare objects side-by-side\n\n```python\nfrom debug_dojo.compareres import inspect_objects_side_by_side\n\na = {\"foo\": 1, \"bar\": 2}\nb = [1, 2, 3]\ninspect_objects_side_by_side(a, b)\n```\n\n## Development\n\n### Run tests\n\n```sh\npytest\n```\n\n### Lint and type check\n\n```sh\nruff check src/debug_dojo --fix\nbasedpyright src/debug_dojo\n```\n\n\n## Changelog\n\n## v0.2.0 (2025-07-20)\n\n*release tag*: [v0.2.0](https://github.com/pydantic/pydantic/releases/tag/v2.11.6)\n\n### What's Changed\n\n- Added `dojo` command for easy debugging setup.\n- Added `p()` function for rich printing.\n- Added history file for tracking changes.\n- Moved to `hatch` for building and packaging.\n\n#### Fixes\n\n- Fixed `pyproject.toml` to point to GitHub repository as the homepage.\n\n## v0.1.0 (2025-07-20)\n\n*release tag*: [v0.1.0](https://github.com/pydantic/pydantic/releases/tag/v2.11.6)\n\n### What's Changed\n\n- Initial module to install debugging tools.\n- Debug mode utilities for PuDB, rich tracebacks, and object inspection.\n\n#### Fixes\n",
"bugtrack_url": null,
"license": null,
"summary": "Debbugging dojo for Python developers",
"version": "0.2.0",
"project_urls": {
"Changelog": "https://github.com/bwrob/debug-dojo/blob/main/HISTORY.md",
"Documentation": "https://github.com/bwrob/debug-dojo/blob/main/README.md",
"Homepage": "https://github.com/bwrob/debug-dojo",
"Source": "https://github.com/bwrob/debug-dojo/tree/main/src/debug_dojo"
},
"split_keywords": [
"debugging",
" inspection",
" pudb",
" rich",
" tools",
" traceback"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8ffa2098bf532b1f00c9657c4baa4094406bdfb993e138d3b724ed72bba36b9c",
"md5": "766a2efc83fe0f2934acc74fb4b1ec3c",
"sha256": "1e5343d59b9e696e4898ad4f6656da43b0e34607bf9fe4549190f557dcc31067"
},
"downloads": -1,
"filename": "debug_dojo-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "766a2efc83fe0f2934acc74fb4b1ec3c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 7288,
"upload_time": "2025-07-20T16:10:33",
"upload_time_iso_8601": "2025-07-20T16:10:33.019634Z",
"url": "https://files.pythonhosted.org/packages/8f/fa/2098bf532b1f00c9657c4baa4094406bdfb993e138d3b724ed72bba36b9c/debug_dojo-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ba54cd3cad97d3492ebebf888394434056aaf66d31ea74c39e5c1c3735e8df7c",
"md5": "05b853b207294386b3fd463c8d02d505",
"sha256": "e1fa5c18a04d76f47a5635282a17318b79f3fd23604f0bab6e49267d1afcab08"
},
"downloads": -1,
"filename": "debug_dojo-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "05b853b207294386b3fd463c8d02d505",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 15565,
"upload_time": "2025-07-20T16:10:34",
"upload_time_iso_8601": "2025-07-20T16:10:34.213501Z",
"url": "https://files.pythonhosted.org/packages/ba/54/cd3cad97d3492ebebf888394434056aaf66d31ea74c39e5c1c3735e8df7c/debug_dojo-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 16:10:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bwrob",
"github_project": "debug-dojo",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "debug-dojo"
}