Trigger ipdb whenever Python crashes
Project description
crash-ipdb
Debug Python crashes conveniently: Whenever a Python code crashes, the ipdb (IPython debugger) debugger will be triggered. And the pdb commands can be used to debug your crash.
Usage
First install it with:
pip install crash-ipdb
Then import crash_ipdb in your Python and run your code as usual (./example.py):
import crash_ipdb # just import crash_ipdb in your Python code
## simple example of source code to be debugged ##
x = 1
y = 0
print(x/y) # When you see '----> 7 print(x/y)', this will mean you have entered the ipdb, stopping at this line
You will find you have entered into ipdb and can use the pdb commands to debug your code:
Traceback (most recent call last):
File "example.py", line 7, in <module>
print(x/y) # When you see '----> 7 print(x/y)', this will mean you have entered the ipdb, stopping at this line
ZeroDivisionError: division by zero
> /home/ukp/kwang/crash-ipdb/crash-ipdb/example.py(7)<module>()
3 ## simple example of source code to be debugged ##
4 x = 1
5 y = 0
6
----> 7 print(x/y) # When you see '----> 7 print(x/y)', this will mean you have entered the ipdb, stopping at this line
Reference
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crash-ipdb-0.0.4.tar.gz.
File metadata
- Download URL: crash-ipdb-0.0.4.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06df97727708de9521e5c88415101cba7c191849988749d504abf9454a361131
|
|
| MD5 |
cee146850527abb44804af549e2307b7
|
|
| BLAKE2b-256 |
53191135d546ec46f231432c9a4f5965971900db44ba47a3380de4e0be4d2458
|
File details
Details for the file crash_ipdb-0.0.4-py3-none-any.whl.
File metadata
- Download URL: crash_ipdb-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6eea70c8fc704b734fdfdd3704c0c35b33dc300d992165ae8bd94b89dd58f1f
|
|
| MD5 |
a935356bc750ddae2114f438fcb76501
|
|
| BLAKE2b-256 |
09aa5cda9c4fdd53872cd45185871cd271d9bf9038886de4f78d88f00637efc9
|