Skip to main content

Debbugging dojo for Python developers

Project description

debug-dojo

debug-dojo is a Python package providing utilities for enhanced debugging and inspection in the terminal. It leverages 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

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:

import debug_dojo.all; b()

Whereb() is a builtin-injected function that sets a breakpoint using PuDB's set_trace(). In the PuDB interface, you can use the following functions:

  • i(object_1) to inspect an object.
  • c(object_1, object_2) to compare two objects side-by-side.

Use individual tools

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

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

pytest

Lint and type check

ruff check src/debug_dojo --fix
basedpyright src/debug_dojo

License

MIT License


Debugging made delightful!

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

debug_dojo-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

debug_dojo-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file debug_dojo-0.1.0.tar.gz.

File metadata

  • Download URL: debug_dojo-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for debug_dojo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a63fbe65250bb0e25542d4f3c8e886791e8f2e6a5bb992ebe4fb75fede4f0cc
MD5 41a3891f9066b159944abdf5941866b6
BLAKE2b-256 e0aa97c62f1fe3161f796107b0d4a54cb88ef5750b1c17fd258da1b9dd9c72a7

See more details on using hashes here.

File details

Details for the file debug_dojo-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for debug_dojo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a4a44bbd4f5d53381863e8e110d40c8d4a0247a0e356be5282b00395ecfa164
MD5 517e7ec02225f36efe6a41c3e38db83d
BLAKE2b-256 84fc661b47fa8e25dfa1494fdb2ccd128e7db9a0acaba61f53d1a672a01efaea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page