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.
- Host: GitHub
- URL: https://github.com/aggstam/debugger
- Owner: aggstam
- License: gpl-3.0
- Created: 2022-07-31T13:23:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-11-30T13:39:17.000Z (8 months ago)
- Last Synced: 2025-11-30T16:23:48.595Z (8 months ago)
- Topics: debug, debugger, debugging, python
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```