Skip to main content
PyPI Python versions https://travis-ci.org/gregoil/ipdbugger.svg?branch=master https://coveralls.io/repos/github/gregoil/ipdbugger/badge.svg?branch=master

ipdbugger is a code debugging tool based on ipdb.

Use the debug decorator on functions or classes to debug them. What actually happens: it surrounds each statement of the functions with a try-except, and starts an ipdb session in the exception handling section.

Installing

$ pip install ipdbugger

Using

from ipdbugger import debug

@debug
def f():
    foo = 1 + 1
    bar = 1 / 0
    baz = 2 + 2

Now when you run f(), you’ll get into an ipdb shell right after the error (the division by zero):

>>> from ipdbugger import debug
>>> @debug
    def f():
        foo = 1 + 1
        bar = 1 / 0
        baz = 2 + 2

>>> f()
Traceback (most recent call last):
   File "<ipython-input-2-5720bb02ab1d>", line 4, in f
    bar = 1 / 0
 ZeroDivisionError: integer division or modulo by zero
> <ipython-input-2-5720bb02ab1d>(5)f()
      2 def f():
      3     foo = 1 + 1
      4     bar = 1 / 0
----> 5     baz = 2 + 2
      6

ipdb> foo
2
ipdb>

From there, you have a couple of choices:

  • retry the action

  • continue with the rest of the flow (and ignore the error)

  • raise the exception, as if you didn’t catch it at all

  • Use any other of the available ipdb commands, like jump

Metadata

Release files for ipdbugger 2.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipdbugger 2.5.0
File Size Uploaded
ipdbugger-2.5.0.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipdbugger 2.5.0
File Interpreter ABI Platform
ipdbugger-2.5.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.6 kB

Release files / ipdbugger-2.5.0.tar.gz

Download URL ipdbugger-2.5.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1dcbffb5b528f385368be78ddb3762085718c2b5111c5dd43f0a383331e9197f
BLAKE2b-256 checksum
How to use checksums
8fd55a70a862a2b5cbe933e2556da492a7c002d19b605ede13a7a0a90ad3029b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

Release files / ipdbugger-2.5.0-py2.py3-none-any.whl

Download URL ipdbugger-2.5.0-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c004f95f1d902d4a2f0b6a78ea75a40e49d5711a012ee04599a5b9760da0954c
BLAKE2b-256 checksum
How to use checksums
6e9b03281666808ad5f0a6300bf2629040de2a5ab62339bfb9fbeee80b9c8fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

Release history Release notifications | RSS feed

This release

2.5.0 This release

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.3

2 release files

1.1.2

1 release file

1.1.1

1 release file

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page