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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5550d57c42c3d7c7e3f78bf94011c7fb94ba3ac01e1acb082b06d10a7471e712 |
|
MD5 | ed79670962256d7b065cafc959f902fa |
|
BLAKE2b-256 | 76a407d27f2b6a1fbf0607a5cdcbeaf016918d69793f15ebee60bcc13e7e4847 |
File details
Details for the file PyBug-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: PyBug-1.2.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 839a15f5386ffa5d244dfedb0c0ddf5d26711005db18475f0ae4fe22f3b2e844 |
|
MD5 | dd6c0d759a383db637a32095ae36a6c3 |
|
BLAKE2b-256 | 517ddfe788024ace78a8103d1ed9297f36af6d6ecc3f745b24f01b1d5b2bc62d |