tartley / colorama

Simple cross-platform colored terminal text in Python
BSD 3-Clause "New" or "Revised" License
3.51k stars 249 forks source link

ANSI Codes inserted, but not interpreted when running in VS 2019 debugger #365

Open talbertine opened 1 year ago

talbertine commented 1 year ago

I can see that the escape sequences are being added as expected when I use things like Fore.RED and whatnot, but instead of changing the colors, they just come out as the sequences.

It works every other way I've tried. Double clicking the script and running it through the python console, using cmd or powershell, and even copying and pasting the code into VS's interactive python console window all work fine. Just not when I run it through the debugger.

Here's some quick code that I used to demonstrate:

from colorama import just_fix_windows_console
just_fix_windows_console()
from colorama import Fore, Back, Style

print(Fore.RED + "Test text" + Style.RESET_ALL)
print("For compariston")

Here's a link to imgur showing the difference.

Is there some setting I need to change to get it to work properly? Or is this just some VS quirk and I'm out of luck?

iuriguilherme commented 1 year ago

203