An open API service indexing awesome lists of open source software.

https://github.com/aggstam/debugger

Simplifying the proper way to debug a program.
https://github.com/aggstam/debugger

debug debugger debugging python

Last synced: about 1 month ago
JSON representation

Simplifying the proper way to debug a program.

Awesome Lists containing this project

README

          

# debugger
You learned that the proper way to debug a program is by printing lines, but found that it is a bit tedious process?

No worry anon, get ready to turn your spaghetti debugging code to a readable and easy to use format!

Go from this:
```python
print("0")
# something
print("1")
# something else
print("aaaa")
```
to a more glorious/professional looking:
```python
from debugger import breakpoint as b

# Normal breakpoint:
b()
# Verbose breakpoint:
b(None, True)
# Passing object to print value:
x = 42
b(x)
# Verbose breakpoint with object value:
b(x, True)
```

and end up with this output:
```text
------Breakpoint------
Line: 4
----------------------
------Breakpoint------
File: /home/x/dev/python/tester.py
Function:
Line: 7
----------------------
------Breakpoint------
Line: 11
Value: 42
----------------------
------Breakpoint------
File: /home/x/dev/python/tester.py
Function:
Line: 14
Value: 42
----------------------
```
As you can see, the debugger is meticulously designed to support all the common line printing tactics.

Have fun debuggin gloriously!

## Usage
After linking the library, import it to your code using:
```python
from debugger import breakpoint as b
```
You can try the example by executing the provided unit test:
```shell
$ python -m unittest
```