Skip to content
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

Auto start watch task #17147

Closed
normalser opened this issue Dec 14, 2016 · 17 comments · Fixed by #63695
Closed

Auto start watch task #17147

normalser opened this issue Dec 14, 2016 · 17 comments · Fixed by #63695
Assignees
Labels
feature-request Request for new features or functionality on-testplan tasks Task system issues
Milestone

Comments

@normalser
Copy link

  • VSCode Version: Code - Insiders 1.8.0-insider (2abfc20, 2016-12-13T09:48:23.832Z)
  • OS Version: Darwin x64 16.3.0

It would be great if VSCode could auto start watch tasks when the project/folder (that has .vscode/tasks.json in it) gets opened - (maybe setting autoStart: true in tasks.json)

Many times (especially being on insiders which frequently asks to restart - sometimes more than once a day) I find myself forgetting to start TS Watch task - and scratching my head why the changes made in code are not being reflected.

Combined with watch task indicator would be very helpful - #8513

@kieferrm kieferrm added feature-request Request for new features or functionality tasks Task system issues labels Dec 14, 2016
@dbaeumer
Copy link
Member

Nice idea.

@dbaeumer dbaeumer added this to the On Deck milestone Dec 14, 2016
@rotemdan
Copy link

rotemdan commented Feb 3, 2017

For close to a year now I've been using the Blade Runner extension that does exactly this. It is very surprising this isn't a function that's provided natively by VS Code. I'm actually at a point I can't even imagine how could I "live" without this functionality.

@rotemdan
Copy link

rotemdan commented Feb 3, 2017

Here's the main source code of that extension:

import * as vscode from 'vscode'; 

export function activate(context: vscode.ExtensionContext) {
	vscode.commands.executeCommand("workbench.action.tasks.build");
}

;)

@calebmer
Copy link

This would be great for providing an awesome experience in project specific workflows.

@ferdis
Copy link

ferdis commented Jul 11, 2017

It would be preferable if this supports one to specify it per-task for multiple tasks.

@philfontaine
Copy link

I developed this extension where you can specify the tasks you want to run/debug: AutoLaunch

@DanTup
Copy link
Contributor

DanTup commented Oct 3, 2018

If this is built into Code, it'd be great if this could support contributed tasks too.

@dbaeumer
Copy link
Member

Yes, it will work for contributed tasks too.

@cyrilletuzi
Copy link

Will we be able to see the task running? In projects like Angular, it's important to see the compilation running, to see errors reported.

@dbaeumer
Copy link
Member

The task will be executed in the terminal as all tasks. Whether the task terminal comes to front or not will depend on the presentation setting of the task (which users can customize)

@mungojam
Copy link

mungojam commented Dec 3, 2018

I may have misunderstood, but isn't this a bit of a security risk? I don't expect when I clone a repository off the net for it to be able to automatically run arbitrary tasks when I open it in VS Code.This change seems to enable that attack vector.

It's different if I choose to debug it or run tests on it or something, where I know there is a risk.

@alexr00
Copy link
Member

alexr00 commented Dec 4, 2018

@mungojam The first time you open a folder, a notification shows up asking if you want to allow auto tasks for that folder. You have the options of allow, disallow, and not now.

@yvbeek
Copy link

yvbeek commented Dec 18, 2018

@alexr00 A notification like that would also be a great solution for the typescript.tsdk security concern (see this comment). Would it be possible to apply it there too?

@alexr00
Copy link
Member

alexr00 commented Dec 19, 2018

@mjbvz for FYI. It looks similar.

@markm77
Copy link

markm77 commented Dec 31, 2018

Thanks very much for adding "run on folder open" to tasks. I wish to request a "run on folder close" to complement this to e.g. stop services that are started on folder open.

I describe my use case in this comment: #54775 (comment)

I really hope you can consider this. : )

Please let me know if I should open a new feature request for this.

@alexr00
Copy link
Member

alexr00 commented Jan 3, 2019

@markfinlabs, thanks for the suggestion! Can you open a new feature request for it please?

@markm77
Copy link

markm77 commented Jan 3, 2019

Sure, no problem. See #65986.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan tasks Task system issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.