https://github.com/cumulus13/pydebugger
Print objects with inspection details and color.
https://github.com/cumulus13/pydebugger
debug inspect python
Last synced: 6 months ago
JSON representation
Print objects with inspection details and color.
- Host: GitHub
- URL: https://github.com/cumulus13/pydebugger
- Owner: cumulus13
- License: other
- Created: 2020-08-31T07:34:57.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-23T04:23:59.000Z (7 months ago)
- Last Synced: 2025-04-09T20:05:24.419Z (6 months ago)
- Topics: debug, inspect, python
- Language: Python
- Homepage:
- Size: 204 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pydebugger
Print objects with inspection details and color.
## Installing
Install and update using `pip`
```python:
$ pip install pydebugger
```pydebugger supports Python 2 and newer, Python 3 and newer, and PyPy.
## Example
What does it look like? Here is an example of a simple pydebugger program:
```python:
# hello.pyfrom pydebugger.debug import debug
debug(variable1="data1", debug=True)
```And what does it look like when it's run and printed in color:
```bash
$ python hello.py
2024:09:12~18:21:45:822673 C:\TEMP\hello.py -> variable1: data1 -> TYPE: -> LEN:5 -> [C:\TEMP\hello.py] [3] PID:21428
```You can set OS Environment variable DEBUG=1 or DEBUG=True to avoid having to use the parameter "debug=1" or "debug=True"
```python:
from pydebugger.debug import debug
debug(variable1="data1")
```you can run "debug.py" to provide a debug server with client support using environment variables:
```bash:
# on terminalexport DEBUG_SERVER=1
export DEBUGGER_SERVER=127.0.0.1:50001
# then run hello.py
```
this will send all info to debug server running on '127.0.0.1' on port 50001You can also run the debug server on a specific port number:
```bash
$ debug.py 50005
```[](https://www.youtube.com/watch?v=XWL72_oLnJ4)
Support
--------* Python 2.7+, Python 3.x
* Windows, Linux## author
[Hadi Cahyadi](mailto:cumulus13@gmail.com)
[](https://www.buymeacoffee.com/cumulus13)
[](https://ko-fi.com/cumulus13)
[Support me on Patreon](https://www.patreon.com/cumulus13)