Add support for 8- and 24-bit ANSI escape color codes in the debug console#70935
Add support for 8- and 24-bit ANSI escape color codes in the debug console#70935isidorn merged 11 commits intomicrosoft:masterfrom
Conversation
src/vs/workbench/contrib/debug/test/browser/debugANSIHandling.test.ts
Outdated
Show resolved
Hide resolved
|
@iansan5653 first of all thanks for your PR. Also have you tested that this fixes this issue Thanks a lot! |
|
@iansan5653 this is good work. |
|
I had a quick test of this, and it seems like the foreground works, but the background does not. For ex., this node coed: const t1 = "\x1B[32m test \x1B[0m";
const t2 = "\x1B[38;5;2m test \x1B[0m";
const t3 = "\x1B[42m test \x1B[0m";
const t4 = "\x1B[48;5;2m test \x1B[0m";
console.log(t1);
console.log(t2);
console.log(t3);
console.log(t4);Looks like this in the terminal: But like this in the Debug Console: (I'm not sure if it's expected that the colours are slightly different too?) |
|
@iansan5653 can comment on that one @DanTup |
|
@DanTup Can you try it now? I had overlooked a comparison when I changed the |
|
Looks like that also fixed a failing test I had so the build is only failing due to an unrelated issue with the main codebase. |
|
@DanTup thanks for verifying Let's keep this as is and I will merge next week. Thanks! |
|
Here's a full test file in case anyone wants to try it themselves. |



Adds support and tests for advanced color codes in the debug console output. Closes #67217.
Sorry for the large commits; I accidentally screwed up my fork's commit history pretty badly so it was simpler just to start from scratch. Let me know if anything needs clarification.