-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No colors in task terminal with clang #9643
Comments
The issue doesn't repro for me. What task type are you using in your task.json? Are you using arg " -fdiagnostics-color=always"? |
No color only with clang.exe and cl.exe. With gcc.exe all fine. task.json:
|
Hi @skarasov . The root of this problem has to do with how gcc and clang detect whether or not they are running within a shell terminal. If they detect they are in a shell terminal, they enable colorization. We could consider it a VS Code bug that the terminal used for tasks does not look like a shell terminal to them. I suspect it has something to do with how VS Code is redirecting and scanning the output of the task, circumventing the compiler's check. We can work around this issue with gcc by forcing colorization to be enabled using After some experimentation, it looks like we can convince clang to also enable colorization using:
We can use this issue to track adding these args to a task when the compiler used appears to be clang, instead of |
works for me, Thanks! |
Issue Type: Bug
Simple c code.
Run build task with clang or cl.
In task terminal no colored output, but in ordinary terminal all fine.
refer:
microsoft/vscode#155444
Extension version: 1.11.4
VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
The text was updated successfully, but these errors were encountered: