-
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
task runner output doesnt show color for gulp taks with --color switch arg #243
Comments
The output control in VS code does not support colors at the moment. |
+1 |
+1 |
6 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
The VS Code integrated terminal already supports colors in the insider preview. Why not the tasks output / debugger console? |
+1 |
I believe VSCode should have an option in tasks definition whether output should appear in terminal or just normal output window |
Actually, I just found out that the debug console supports colors too. It's only the tasks. |
It would be very helpful if task console output is colorized in the Tasks window just like it is in the Terminal (ctrl+`) window. |
+1 |
1 similar comment
+1 |
If someone could give me guidance on where to look, I could send a PR for |
@nojvek, you just need to open a project and run the build (Ctrl-Shift-B or Ctrl-Command-Build). The 'Output' window will appear in the bottom of the window, showing the 'Tasks' output, similar to Visual Studio's 'Build' output. See sample screenshot here: https://code.visualstudio.com/images/tasks_problemmatcher.png |
Related stackoverflow post: http://stackoverflow.com/questions/30492083/can-i-get-colored-output-from-gulp-in-vscode-output-window |
We just released a language extension that brings colorization to the Output panel. Basically, it is a language extension that adds the text/x-code-output mime type, which is used by the Output panel. Get it here: https://marketplace.visualstudio.com/items?itemName=IBM.output-colorizer Source here: https://github.com/IBM-Bluemix/vscode-log-output-colorizer Please help contribute! Bugs, feature requests, contributions all welcome. |
Why not just fix it in vscode? This seems like a core feature that should |
From what I have seen, all language colorization (syntax highlighting) is done with extensions, and it appears that the developer site encourages this approach. The extension could definitely be bundled with VSCode at build time with very little effort. I'd love to see it get in there. IE: https://code.visualstudio.com/docs/customization/colorizer |
so, poking at the internals, I see that the output window is basically treated as another editor window, with a special MIME type, which is why @triceam was able to add syntax highlighting. Very naive question here, but let's say that hypothetically the ANSI control codes for colorization weren't removed before the output is streamed to the terminal. Could a syntax highlighter be written that actually matched on these control codes to display colors in the output? It may be easier in the end to use a proper terminal emulator to display task output, but just a thought. |
Until the integrated terminal supports this, I'd like to run tasks in an external terminal window. Is this possible? |
@fredrikaverpil set |
Thanks! @felixfbecker |
@fredrikaverpil I Have been trying to do the same. The lack of colors in output makes tasks quite crippled. I was able to get this working on Mac, via the following. This opens Terminal, CDs into the current workspace, and then runs an NPM command (lint in this case).
This is not ideal, as it spawns a new Terminal window each time. Ideally I would LOVE to direct this command to the internal terminal, or just have colors in output pane. |
Is it possible to change these windows from a "Read Only Editor" type to a "Terminal" type so the ANSI control codes are supported? |
It is possible to run tasks in the integrated terminal by specifying |
That would be pretty awesome.
I'm using a plug in called run and save and if runs a defined command in
existing terminal.
So I think it should be doable. May be requires some work on the problem
parsing.
…On Sun, Mar 5, 2017 at 9:55 AM Christian Mösl ***@***.***> wrote:
It is possible to run tasks in the integrated terminal by specifying "_runner":
"terminal" in the tasks configuration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#243 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-JVMNQXQMgcChGzUx0i25CAuf0zQ5Vks5rivb-gaJpZM4Gll6C>
.
|
@ChristianMoesl Great solution, thanks. |
I am amazed by VSCode and this community... I just now today caught myself thinking how cool it would be to have colored output from tasks, so I found this issue which is well over a year old, and @ChristianMoesl's answer is only from yesterday but solves the problem in a really neat way :) |
Release note is here. http://code.visualstudio.com/updates/v1_9?wt.mc_id=DX_878977#_task-execution-in-terminal |
`_runner` : why the underscore? Looks so ugly.
…On Mon, Mar 6, 2017 at 11:36 PM, Tsuyoshi Sumiyoshi < ***@***.***> wrote:
Release note is here.
http://code.visualstudio.com/updates/v1_9?wt.mc_id=DX_
878977#_task-execution-in-terminal
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#243 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-JVGIgR92kUal3_qaSYHfXxw-yUPRIks5rjQj5gaJpZM4Gll6C>
.
|
Thanks @ChristianMoesl. It does "work", but you either have to select the window, press space, or else it doesn't clear the output every time the task is executed. It's nice to have color output (for GCC) again, but not as smooth as the default output behavior. |
|
Problem with running in Terminal is that it breaks the window system, this must be done on output view. Run on Save fork that runs in terminal for instance always opens the terminal when it runs. This has annoying side effect that the in Zen mode the terminal pops up from nowhere when I save. |
I'm curious, what is the current status of this issue and what will be done to solve it? There are some workarounds etc. in this thread, but the main question is, can we get coloured output in the output panel as well? I think this mainly goes for commands that "normally" go through the terminal but could also go through the output window. For instance, if I run my yarn or npm commands to the output window in stead of the terminal, a line with green color is shown as following:
You can allow output to the output pannel through setting I have looked at the IBM plugin, the Output Colorizer. It looks nice but I think it does not do what we expect for terminal like commands. The yarn/npm commands (maybe by a package like chalk even!) are intentionally coloured. The Output Colorizer just makes assumptions on colours. Thats not the same imo. |
I have a build task that builds a C++ project using C++. I would like to color the errors reported by gcc. I have installed the Colorizer plugin (mentioned above) and that plugin does indeed color text in the Output window. However, my build task sends its output to the Terminal window and Colorizer seems to have no effect on Terminal. Not sure what is going on here. Has the behavior of VS Code changed this year such that task output is now sent to Terminal instead of Output? Can Colorizer act on Terminal? Or, is there another way of colorizing the output of Terminal? |
Actually this got implemented by executing tasks in the terminal with task v2.0.0. I will close the issue since the original description is resolved. Please open separate issue if you think something is not working correctly in terms of coloring in the terminal. |
@dbaeumer do tasks in terminal support |
Yes, they do. |
It is important to have color on the task output window to identify errors and success messagess in jasmine/karms test runner through gulp command. without this it is very hard to troubleshoot your unit test issues and identify issues in the code.
The text was updated successfully, but these errors were encountered: