visual-studio-codeansi-escapextermjs

Why don't ANSI escape codes for blinking text work in VS Code's integrated terminal?


color.js

console.log('\u001B[32m Green Color Text \u001B[0m'); // outputs "Green Color Text"

console.log("\u001B[5m Blinking Text \u001B[0m") // outputs "Blinking Tex" but it does not blink in VS Code PowerShell Terminal

If I run the above script in Windows 11 PowerShell (node color.js), it logs them correct and second one blinks.

If I run the same script in PowerShell terminal inside of VS Code, the second one does not blink.

I want to ask why PowerShell outcome is different inside VS Code although it is the same program?


Solution

  • This is a known issue. VS Code's integrated terminal is based on xterm.js. Googling "xtermjs blinking text", I found https://github.com/xtermjs/xterm.js/issues/2891, which points to https://github.com/xtermjs/xterm.js/issues/944. You can give that issue ticket a thumbs up to show support for it, and subscribe to it to get notified about discussion and progress. Please avoid noisy comments like "+1" / "bump", and consider offering to help implement the change if you know how to do so.