That's not a problem with vscode, but general thing with bash/powershell/cmd (kind reminder that the console that vscode uses, is driven by powershell/bash).
I think I managed to find a fine solution/mitigation for your problem. I found this answer which gave nice results.
TBH I don't like this IPython look. Never did. After some research I came up with this improved code
import sys
from IPython.core.ultratb import ColorTB
sys.excepthook = ColorTB()
Which colored well for me on Windows:
But adding this code each time will be... Very annoying. We should find a way to make it run on any .py on vscode.
I found a way to make any Python file run some line of code before running any script.
Go to your python PythonXY\Lib\site-packages
where XY is your python version. Add file named exactly sitecustomize.py
, and add our improved script.
Test it by printing non-existent variable print(a)
and you should see color :)