question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide Task Runner viewlet

See original GitHub issue

We did a Task 2.0 deep dive today and this issue collects the combined feedback received.

Task Properties

  • echo should be true by default so that users get a better idea of the task executed
  • we should support flattening the JSON properties as we do with other settings (e.g "terminal.echo": true instead of "terminal": { "echo": true }
  • we should better separate task declaration from task customization. Currently both happens in the tasks array property and the differentiating element is the customize property.

Task Picker

The task picker should support a decription / detail message to better explain what the task does. We also discussed whether the task picker should support MRU which would automatically move the most used tasks up to the top without customization. If we provide a task panel (see below) such a MRU list could be useful there as well.

Task Customization

The task customization is currently instance based where the task instance is identified by a task id, which can be quite ‘cryptic’. An alternative way would be to identify a task based on a type and a key that is defined by the type and therefore can vary from task runner to task runner. So instead of having something like:

	{
		"customize": "vscode.npm.run build",	
		"taskName": "npm: run build"
	}

a customization would look like this

	{
		"customize": {
			"type": "npm",
			"file": "${workspaceRoot}/package.json",
			"script": "build"
		},
		"problemMatcher": ["$tsc"]
	}

where the structure of the identifying attribute is defined by the extension providing the runner support. In the example above the fact that a npm script is identified by the location of the package.json file and the script name comes from the npm extension. This might look different for task contributed by gulp of TypeScript

Problem Matchers

For task that execute a target of a task runner (e.g. gulp, npm, grunt) VS Code can’t decide which problem matchers to attach. Since picking the right problem matcher currently requires editing the tasks.json file we should better support the user with this. We discussed the following ideas:

  • always attach all known problem matchers if a task has no problem matchers. This might result in false positives and might require us to support removing problem matchers via a configuration mechanism.
  • we could help the user attaching a problem matcher by generically scanning the output for problems and suggest problem matchers that exactly match these. If selected we update the tasks.json file for the user.

Task panel

It was suggested to run tasks in its own panel instead of reusing the terminal panel. They should still be executed using the terminal to get ANSI control character support and other nice terminal features (e.g. Ctrl+C). The panel could offer additional features like:

  • a task summary (execution time, exit code, …)
  • the output of a task could be folded (like travis does for example)
  • allow for in place customization of a task (for example attach a problem matcher) without the user being forced to edit a tasks.json file.

We also discussed the need of a task viewlet but decided that this will not add any big additional value over the task picker and a separate panel.

Top Level Menu

We were also discussing whether the tasks deserve a top level menu. In general this was consider a good idea. However such a menu should be semantically not technical. So instead of naming it Tools or Tasks it would be better to offer top level menus like Build, Rebuild All, Clean, Run Tests. The downside of such an approach is that such a menu looks out of place if none of these entries trigger any meaningful action in the workspace (e.g. if a simple JS project is open at lease Build, Rebuild All and Clean don’t make any sense)

Better Selfhosting

Would be great if we can improve the self hosting coverage of tasks. This is currently hard to do due to the fact how we build. But @dbaeumer will tweak our tasks.json to support more tasks currently run in the terminal (e.g run tests, linting, …)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:33
  • Comments:46 (27 by maintainers)

github_iconTop GitHub Comments

16reactions
bpaserocommented, Jun 14, 2017

I would still want us to explore the possibility of a panel for tasks, I think UX scalability as reason to not do it is not very fair, we need to solve the panel overflow no matter what in the same way we solved it for the activity bar (being able to show/hide panels, reorder them, see a “…” overflow menu when space is too little).

I do agree though there is some overlap in Debug Console, Integrated Terminal, Output and Tasks, however I am not sure if it would make sense to put them all into one. There is very specific scenarios for each of the panels:

  • output: after tasks moved to terminal I would argue output is only ever being used as a way to see diagnostics (I wonder if we should make output less prominent)
  • debug console: has rich functionality when debugging, but otherwise is quite useless (maybe we should only show it when you are in a debug session?)
  • terminal: this is where I execute shell commands. nothing in here is related to VS Code, it is just convenient to not have to leave VS Code to use it
  • tasks: this is VS Code specific: I execute potentially multiple long running tasks, each with output and progress and possible error conditions (markers)

Here is a mockup for the Tasks panel:

image

We can provide an explicit configure action per task which would guide users to configure problem matchers. We can make all tasks discoverable from here by having a dropdown to show all tasks that can be executed.

/cc @stevencl

10reactions
nonameolssoncommented, Aug 1, 2017

So I have been thinking about how I would like it to be. As I already mentioned I like the solution from JetBrains and from Visual Studio.

Here is a suggestion. What do you think? Of course there are things I haven’t figured out yet, but it’s a first draft suggestion at least.

vscode tasks 2 0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task Runner - Visual Studio Marketplace
Extension for Visual Studio Code - VS Code extension to view and run tasks from Explorer pane.
Read more >
Advanced Basics: Using Task Runner in Visual Studio
A Task Runner is a tool to automate repetitive client-side tasks. The tool runs off of a configuration file (either Gulp or Grunt)...
Read more >
Task Running in VS Code
Overview of VS Code's builtin task runner. ... There is a new viewlet that can be enabled in the Explorer view to display...
Read more >
Sharepoint task list - Mesciuma |
Oct 20, 2019 · A Microsoft SharePoint project task list displays a ... Default: This view, as name suggest, is the default style...
Read more >
self hosted vscode online
Commands Palette is the keyboard way to accomplish any task in VS Code. ... Self-hosted runners offer more control of hardware, operating system, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found