Ipdbugger
Debugging utility that helps you inspect your code
Install / Use
/learn @gregoil/IpdbuggerREADME
ipdbugger
.. image:: https://img.shields.io/pypi/v/ipdbugger.svg :alt: PyPI :target: https://pypi.python.org/pypi/ipdbugger/
.. image:: https://img.shields.io/pypi/pyversions/ipdbugger.svg :alt: Python versions :target: https://pypi.python.org/pypi/ipdbugger/
.. image:: https://travis-ci.org/gregoil/ipdbugger.svg?branch=master :target: https://travis-ci.org/gregoil/ipdbugger
.. image:: https://coveralls.io/repos/github/gregoil/ipdbugger/badge.svg?branch=master :target: https://coveralls.io/github/gregoil/ipdbugger
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
.. code-block:: console
$ pip install ipdbugger
Using
.. code-block:: python
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):
.. code-block:: pycon
>>> 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:
retrythe actioncontinuewith the rest of the flow (and ignore the error)raisethe exception, as if you didn't catch it at all- Use any other of the available
ipdbcommands, likejump
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
