Skip to content

IlanOu/Debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Debugger

Simple debugger Python to show colored text in command prompt.

Installation

pip install git+https://github.com/IlanOu/Debug.git

Examples

Import the library

from debug import Debug, Style

Debug

# Basic
Debug.Log("Hello World !")
# Debugging
Debug.LogError("Hello World !")
Debug.LogWarning("Hello World !")
Debug.LogSuccess("Hello World !")
Debug.LogWhisper("Hello World !")
# Custom
Debug.LogColor("Hello World !", Style.RED + Style.BOLD)
# 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

Debug.blocking = False

To enable/disable emojis

Debug.emojisActive = False

To enable/disable the prefix

Debug.prefixActive = False

To enable/disable all Debug.LogWhisper

Debug.verbose = False

Style

The Style can be used in some Debug methods (ex: Debug.LogColor("Hello", Style.RED)).

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)