Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilanou/debug
📚 Python Debug Lib
https://github.com/ilanou/debug
debugging-tool library python3
Last synced: 1 day ago
JSON representation
📚 Python Debug Lib
- Host: GitHub
- URL: https://github.com/ilanou/debug
- Owner: IlanOu
- License: mit
- Created: 2024-05-06T12:54:59.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-05-15T12:16:06.000Z (6 months ago)
- Last Synced: 2024-05-16T02:00:41.343Z (6 months ago)
- Topics: debugging-tool, library, python3
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Debugger
Simple debugger Python to show colored text in command prompt.
## Installation
```bash
pip install git+https://github.com/IlanOu/Debug.git
```## Examples
Import the library
```py
from debug import Debug, Style
```### Debug
```py
# Basic
Debug.Log("Hello World !")
``````py
# Debugging
Debug.LogError("Hello World !")
Debug.LogWarning("Hello World !")
Debug.LogSuccess("Hello World !")
Debug.LogWhisper("Hello World !")
``````py
# Custom
Debug.LogColor("Hello World !", Style.RED + Style.BOLD)
``````py
# Separators
Debug.LogSeparator()
Debug.LogSeparator("Separator")
Debug.LogSeparator("Separator", Style.BOLD)Debug.LogFatSeparator("Separator")
Debug.LogFatSeparator("Separator", Style.BOLD)
```#### You have parameters for the debugger
To enable/disable if the `Debug.LogError` is blocking
```py
Debug.blocking = False
```To enable/disable emojis
```py
Debug.emojisActive = False
```To enable/disable the prefix
```py
Debug.prefixActive = False
```To enable/disable all `Debug.LogWhisper`
```py
Debug.verbose = False
```### Style
The Style can be used in some Debug methods (ex: `Debug.LogColor("Hello", Style.RED)`).
```py
print(Style.WARNING + "WARNING !!!" + Style.ENDC)print(Style.BLUE + "Blue text" + Style.ENDC)
print(Style.UNDERLINE + "Underline text" + Style.ENDC)
print(Style.UNDERLINE + Style.BLUE + "Blue and underline text" + Style.ENDC)
```