Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support output colors PLEASE #141556

Closed
OnkelTem opened this issue Jan 26, 2022 · 12 comments
Closed

Support output colors PLEASE #141556

OnkelTem opened this issue Jan 26, 2022 · 12 comments
Assignees

Comments

@OnkelTem
Copy link

OnkelTem commented Jan 26, 2022

I don't understand what is wrong with the output buffers of VSCode as they don't seem to support... colors!

I still cannot believe this, I searched stackoverflow, forums, this issue queue, trying to find an option which (for some awkward reason) might be accidentally disabled or something... But no. No Colors.

There was a thread 7 years ago on exactly this problem:
#243

At first it looked promising, but finally it was closed in fact unresolved due to its narrow scope (gulp tasks).
I then tried to find its follow-ups, but none found.

So let me put it clear: service facilities as well as our programs intentionally produce colors to help us read the output, and then VSCode removes the colors to make our life... harder? And the fact that the output doesn't contain any escape-sequences means that VSCode is just filtering them out. Correct me if I'm wrong please, but doesn't it look like a sabotage?

So please, give us our colors back.

P.S. I'm aware of an extension called "Output Colorizer" which is regularly recommended as a "workaround". Listen, it's not a workaround, as all what it does - is making some false assumptions and speculations on the output. It simply doesn't make any sense.

@melroy89
Copy link

I fully agree!

The "Output Colorizer" from IBM is really NOT what we want. We just want default color support in the output buffers in VSCode.

@tailaiw
Copy link

tailaiw commented Jan 30, 2022

Agree! I almost feel like I'm too dumb to figure out how to set it up because this is such a basic feature. I really hope someone can tell me it is me too dumb and there's a native way.

@gjsjohnmurray
Copy link
Contributor

Please provide more information. It sounds like you are referring to what VS Code calls Output Channels. By default these are displayed on a tab of the Panel, which appears at the bottom of the window and has a dropdown where you pick which channel to view.

What are you running, and how exactly, which is sending its output to an Output Channel?

@melroy89
Copy link

Please provide more information. It sounds like you are referring to what VS Code calls Output Channels. By default these are displayed on a tab of the Panel, which appears at the bottom of the window and has a dropdown where you pick which channel to view.

What are you running, and how exactly, which is sending its output to an Output Channel?

Yes we are all talking about the output channel.

In my case it's the cmake build system that output to this output channel.

And more precisely I added a custom target command in cmake which also executes Google Test (ctest). In my normal terminal it shows colors (yes I set the Google test environment variable for color in the cmake custom command). But there is no color at all in the vscode output channel.

@gjsjohnmurray
Copy link
Contributor

There is a long-open request at microsoft/vscode-cmake-tools#478 for that extension to use a VS Code Terminal for its output instead of an Output Channel.

@melroy89
Copy link

melroy89 commented Jan 30, 2022

You're right. Seeing the 56 likes and 13 hearts. I think people would love to see this getting changed to a normal (vscode) terminal.

Edit: cmake is always using the output channel for the build. Regardless of the build type.

@OnkelTem
Copy link
Author

Here's how vscode-jest behaves here:

  1. When it runs in the "debug" mode, it switches to the Terminal output and colors are preserved;
  2. When it runs in the "run" mode, it uses an Output channel, no colors are displayed, the output is "blind".

I don't know if it's done intentionally or it's a sort of a side-effect.

@melroy89
Copy link

That sounds more like a specific extension related issue. Report that here: https://github.com/jest-community/vscode-jest

I was actually aiming for a generic solution in vscode core itself.

@gjsjohnmurray
Copy link
Contributor

@deepak1556 deepak1556 assigned sandy081 and unassigned deepak1556 Feb 1, 2022
@securisec
Copy link

@sandy081
Copy link
Member

sandy081 commented Feb 4, 2022

Thanks @gjsjohnmurray for providing very useful information. We do not want to support colors in Output channel, it is like an editor that shows text. We are planning to provide support for configuring language to it but not colors. One has to use terminals for that. Please file issue against corresponding extensions for that.

@IGR2014
Copy link

IGR2014 commented Mar 21, 2022

Visualization of the issue:
("Output" window when colors are enabled for both Clang and Ninja)
image
P.S. Actually, why don't just give us setting to enable/disable this possibility (defaulted with disable)

@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants