Change:
Version: 1.33.0-insider (user setup) Commit: Date: 2019-03-13T06:18:20.237Z Electron: 3.1.6 Chrome: 66.0.3359.181 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0. When coloring debug console output with ANSI escape codes, VSCode will not always properly handle new colors. Instead, it seems to apply a hierarchy of colors where, for example, white will override any other succeeding colors. For example, printing the following string: Results in this output in VSCode: ! Powershell, on the other hand, handles this properly: !
Dup of some of these
I don't see which one it would be a duplicate of. is about a different format, is related to theming and colors, and relate to other locations in the program (not the Debug Console).
How about this one And here's a broader list
is about support for a different format for color codes. This specific bug notes that the colors I am trying to use are supported and rendered, but not handled properly when multiple colors are used in succession. I don't see it in that list either.
Ok, let's reopen this one.
We accept PR's that fix this. Code pointer
I'll work on it, thanks!
Make sure to add tests here

Discussion:
styleNames.push('code-italic'); } else if (code === 4) { styleNames.push('code-underline'); <del> } else if ((code >= 30 && code <= 37) || (code >= 90 && code <= 97)) { styleNames.push('code-foreground-' + code); } else if (code === 39) { // Remove all foreground colour codes </del> <ins> } else if (code === 39 || (code >= 30 && code <= 37) || (code >= 90 && code <= 97)) { // Remove all previous foreground colour codes </ins> styleNames = styleNames.filter(style => !style.match(/^code-foreground-d+$/)); <del> } else if ((code >= 40 && code <= 47) || (code >= 100 && code <= 107)) { styleNames.push('code-background-' + code); } else if (code === 49) { // Remove all background colour codes </del> <ins> if (code !== 39) { styleNames.push('code-foreground-' + code); } } else if (code === 49 || (code >= 40 && code <= 47) || (code >= 100 && code <= 107)) { // Remove all previous background colour codes </ins> styleNames = styleNames.filter(style => !style.match(/^code-background-d+$/)); <ins> if (code !== 49) { styleNames.push('code-background-' + code); } </ins> } }

}); } <del> // Codes do not interfere assertSingleSequenceElement('x1b[1;3;4;30;31;32;33;34;35;36;37m', (child) => { assert.equal(11, child.classList.length); </del> <ins> // Different codes do not interfere assertSingleSequenceElement('x1b[1;3;4;30;41m', (child) => { assert.equal(5, child.classList.length); </ins> assert(dom.hasClass(child, 'code-bold')); assert(dom.hasClass(child, 'code-italic')); assert(dom.hasClass(child, 'code-underline')); <del> for (let i = 30; i <= 37; i++) { assert(dom.hasClass(child, 'code-foreground-' + i)); } </del> <ins> assert(dom.hasClass(child, 'code-foreground-30')); assert(dom.hasClass(child, 'code-background-41')); }); // New foreground color codes remove old codes assertSingleSequenceElement('x1b[30;31;32;33;34;35;36;37m', (child) => { assert.equal(1, child.classList.length); assert(dom.hasClass(child, 'code-foreground-37')); }); // New background color codes remove old codes assertSingleSequenceElement('x1b[40;41;42;43;44;45;46;47m', (child) => { assert.equal(1, child.classList.length); assert(dom.hasClass(child, 'code-background-47')); }); // New foreground codes don't remove old background codes and vice versa assertSingleSequenceElement('x1b[40;31;42;33m', (child) => { assert.equal(2, child.classList.length); assert(dom.hasClass(child, 'code-background-42')); assert(dom.hasClass(child, 'code-foreground-33')); </ins> }); // Duplicate codes do not change output