You can use chalk
to color your console.log()
for better CLI experience. But it might not work in VSCode, it still shows black and white. The problem is in Debug Console of VSCode.
Debug Console is NOT a terminal emulator and it only implements a small number of ANSI control codes.
We should use the external console by open launch.json
, set the "console": "integratedTerminal"
Solution from https://github.com/microsoft/vscode/issues/3006