Metadata-Version: 2.4
Name: debug-dojo
Version: 0.2.0
Summary: Debbugging dojo for Python developers
Project-URL: Homepage, https://github.com/bwrob/debug-dojo
Project-URL: Documentation, https://github.com/bwrob/debug-dojo/blob/main/README.md
Project-URL: Source, https://github.com/bwrob/debug-dojo/tree/main/src/debug_dojo
Project-URL: Changelog, https://github.com/bwrob/debug-dojo/blob/main/HISTORY.md
Author-email: bwrob <bartosz.marcin.wroblewski@gmail.com>
License-Expression: MIT
Keywords: debugging,inspection,pudb,rich,tools,traceback
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: pudb>=2020.1
Requires-Dist: rich>=11.0.0
Description-Content-Type: text/markdown

# 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
