Implementation of Rust2018 `dbg` builtin for Python.
Project description
pydbg 🐛
pydbg
is an implementation of the Rust2018 builtin debugging macro dbg
.
The purpose of this package is to provide a better and more effective workflow for people who are "print debuggers".
pip install pydbg
from pydbg import dbg
The old way:
a = 2
b = 3
print(f"a + b after instatiated = {a+b}")
def square(x: int) -> int:
return x * x
print(f"a squared with my function = {square(a)}")
outputs:
a + b after instatiated = 5
a squared with my function = 4
The new (and better) way
a = 2
b = 3
dbg(a+b)
def square(x: int) -> int:
return x * x
dbg(square(a))
outputs:
[testfile.py:4] a+b = 5
[testfile.py:9] square(a) = 4
This project is a work in progress and all feedback is appreciated.
The next features that are planned are:
- Fancy Mode (display information about the whole callstack)
- Performance Optimizations
- Typing information
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
pydbg-0.1.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for pydbg-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55d1bda881a5e236d0bbd770a3182c199e2380c3265a01bef836f0b17d19451b |
|
MD5 | 5af14882e693a343e2b226701e63e0f1 |
|
BLAKE2b-256 | e2ab3e55d4e5063a689f5588747d705d9a0984196c6fdb1d40c7f2546f963af6 |