Skip to main content

PyBug extends Python's interactive debugger (pdb), making it simpler to add breakpoints to your code.

Project description

PyBug - python debugging utilities

PyBug extends Python's interactive debugger (pdb), making it simpler to add breakpoints to your code. Uses ipdb if available.

Usage examples:

# Like pdb.set_trace(), but shorter :) and works with nosetests.
import bug; bug.trace()

# Set a breakpoint at line 35 of package.module
bug.setbreak(35, "package.module")

# Set a conditional breakpoint at line 42 of /path/to/universe.py
bug.setbreak(42, "/path/to/universe.py", "name == 'hitchhiker'")

There are two notable features here that would ideally make it into the pdb module in the Python Standard Library:

  • Easily set a breakpoint at an arbitrary line in an arbitrary module. This is useful when debugging a third-party library where the code cannot easily be edited to add a set_trace() call.

  • Set a breakpoint in a module named by import path rather than file path.

Changes

1.2

  • Use ipdb if available

1.1

  • Fix trace() for proper readline support
  • Fix syntax error on Python 3

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

PyBug-1.2.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

PyBug-1.2.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file PyBug-1.2.1.tar.gz.

File metadata

  • Download URL: PyBug-1.2.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyBug-1.2.1.tar.gz
Algorithm Hash digest
SHA256 5550d57c42c3d7c7e3f78bf94011c7fb94ba3ac01e1acb082b06d10a7471e712
MD5 ed79670962256d7b065cafc959f902fa
BLAKE2b-256 76a407d27f2b6a1fbf0607a5cdcbeaf016918d69793f15ebee60bcc13e7e4847

See more details on using hashes here.

File details

Details for the file PyBug-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for PyBug-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 839a15f5386ffa5d244dfedb0c0ddf5d26711005db18475f0ae4fe22f3b2e844
MD5 dd6c0d759a383db637a32095ae36a6c3
BLAKE2b-256 517ddfe788024ace78a8103d1ed9297f36af6d6ecc3f745b24f01b1d5b2bc62d

See more details on using hashes here.

Supported by

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