-
Notifications
You must be signed in to change notification settings - Fork 29.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 #155444
Comments
the one without color is an extension contributed terminal. you can file an issue with the C/C+ extension about this |
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. Happy Coding! |
Please, note: |
@meganrogge Note that this is not caused by the extension. Rather, something VS Code is doing with the task terminal is preventing compilers (gcc and clang) from detecting that they are in a shell terminal, causing them to disable colorized output. We can work around the problem by passing command line arguments that force gcc and clang (separately) to enable colorized output. However, the underlying issue is with VS Code. Please consider re-opening and addressing the issue in VS Code. |
@Colengms thanks for the info. I'm not very familiar with how gcc and clang work, but what are those using to detect that they are in a shell terminal? environment variables? |
The code for gcc and clang are available online. For GCC, I see: https://code.woboq.org/gcc/gcc/diagnostic-color.c.html For Clang, I'm not sure. I just did a quick search, and see similar functionality in: |
@Colengms can you link where |
Hi @Tyriar . It looks like cpptools is calling spawn to create this process, so the cause is indeed in cpptools. You can close this issue. It looks like the correct solution is for cpptools to use node-pty (which VS Code uses internally) to spawn a process with a pseudo-terminal. It looks like that would require us to always build the TypeScript component on the target platform, which we're not currently doing. I'm tracking that with: microsoft/vscode-cpptools#9681 |
@Colengms I'm not too familiar with how tasks interact with extensions, is it possible to launch a regular shell terminal instead? I think this is how the npm tasks would work since they have color |
Nothing to verify? |
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.
VS Code version: Code 1.69.1 (b06ae3b, 2022-07-12T08:21:24.514Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Extensions (3)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: