Skip to main content

Practice debugging, by intentionally introducing bugs into an existing codebase.

Project description

py-bugger logo

py-bugger

When people learn debugging, they typically have to learn it by focusing on whatever bugs come up in their code. They don't get to work on specific kinds of errors, and they don't get the chance to progress from simple to more complex bugs. This is quite different from how we teach and learn just about any other skill.

py-bugger lets you intentionally introduce specific kinds and numbers of bugs to a working project. You can introduce bugs to a project with a single file, or a much larger project. This is much different from the typical process of waiting for your next bug to show up, or introducing a bug yourself. py-bugger gives people a structured way to learn debugging, just as we approach all other areas of programming.

Full documentation is at https://py-bugger.readthedocs.io/.

Installation

$ pip install python-bugger

Note: The package name is python-bugger, because py-bugger was unavailable on PyPI.

Basic usage

If you don't specify a target directory or file, py-bugger will look at all .py files in the current directory before deciding where to insert a bug. If the directory is a Git repository, it will follow the rules in .gitignore. It will also avoid introducing bugs into test directories and virtual environments that follow familiar naming patterns.

py-bugger creates bugs that induce specific exceptions. Here's how to create a bug that generates a ModuleNotFoundError:

$ py-bugger -e ModuleNotFoundError
Introducing a ModuleNotFoundError...
  Modified file.

When you run the project again, it should fail with a ModuleNotFoundError.

For more details, see the Quick Start and Usage pages in the official docs.

Contributing

If you're interested in this project, please feel free to get in touch. If you have general feedback or just want to see the project progress, please share your thoughts in the Initial feedback discussion. Also, feel free to open a new issue. The contributing section in the official docs has more information about how to contribute.

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

python_bugger-0.5.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

python_bugger-0.5.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file python_bugger-0.5.0.tar.gz.

File metadata

  • Download URL: python_bugger-0.5.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_bugger-0.5.0.tar.gz
Algorithm Hash digest
SHA256 58e290c7aec89b504fae4d419baf6f9714a2d59b07ee4e28b502b01b237700c9
MD5 3e4ce6f9eb11db21e676da6fb124c2a8
BLAKE2b-256 0e002a4899c2d8455decb8f502d7f935fcc755e4b9d722d2a6335d0962349711

See more details on using hashes here.

File details

Details for the file python_bugger-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: python_bugger-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_bugger-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4edce4253a8acc7e6bbaf9bf584f4625ede9fc717c9cc783b52c4697469ed582
MD5 2ad1d70cb5de233cac51ad4f0601ef1b
BLAKE2b-256 144e8c10c320feaef40fc7d271a32522d730536eeb87f6ee53e76a9b13af3469

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