-
Notifications
You must be signed in to change notification settings - Fork 93
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 for ANSI TTY Esc Colorization Codes #76
Comments
The output detection works differently than you might think. For instance, one can't actually set the output color of a line. One can only classify a line as a particular type that is associated with a color. The classification is sometimes ignored when there are conflicting circumstances. The other thing VS does not allow is changing the actual text of the output window. For instance, I've had several requests to suppress lines of output in the debug view. Can't do it because VS does not provide a hook to modify text. So while a good idea, there would be no way to remove the escacpe sequences from the output. The sections could be colored but the escape codes would remain. |
I wonder if simply making another VS (channel) log-panel-window might be
an easier more flexible solution then?
Thoughts...?
p.s., I can't remember at the moment what VS actually calls the set of
panels that are grouped with build, etc. But I remember they are not too
hard to create; it's been quite a while since I was on the Microsoft
DevDiv Team working on VS.
… Mike Ward ***@***.***>
Saturday, July 14, 2018 8:00 AM
The output detection works differently than you might think. For
instance, one can't actually set the output color of a line. One can
only classify a line as a particular type that is associated with a
color. The classification is sometimes ignored when there are
conflicting circumstances. The other thing VS does not allow is
changing the actual text of the output window. For instance, I've had
several requests to suppress lines of output in the debug view. Can't
do it because VS does not provide a hook to modify text.
So while a good idea, there would be no way to remove the escacpe
sequences from the output. The sections could be colored but the
escape codes would remain.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKB-n-NELNx291-myHjY9Ow1F2d1anZNks5uGgefgaJpZM4VPtfj>.
|
This is an old issue but still valid. In my case webpack produces a lot of colored console text like this:
When I run the command in a terminal (inside Visual Studio) the colors look fine! |
@Khaos66 As stated above, there is no hook to modify the output text in the build window. This is limitation that Visual Studio imposes.
The terminal window has a terminal shell, the build window does not. |
Writing an ANSI tty escape filter to remove them is a small amount of code. And not too much more to convert them to make calls to some internal API. With that said, plugging such a small library into context is the real work. |
Do you think it is reasonable/feasible to have it auto-detect ANSI TTY color codes and both hide the ANSI TTY codes and use them to colorize the text.
That would be awesome for simply streaming stderr output and other similarly embedded pre-colorized streams of data.
I'm interested in doing the work, but would like to know if the author thinks it is feasible.
See also this tool
And related comments
Visual Studio Marketplace comments
The text was updated successfully, but these errors were encountered: