-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
Comments
Nice idea. |
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. |
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");
} ;) |
This would be great for providing an awesome experience in project specific workflows. |
It would be preferable if this supports one to specify it per-task for multiple tasks. |
I developed this extension where you can specify the tasks you want to run/debug: AutoLaunch |
If this is built into Code, it'd be great if this could support contributed tasks too. |
Yes, it will work for contributed tasks too. |
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. |
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) |
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. |
@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. |
@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? |
@mjbvz for FYI. It looks similar. |
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. |
@markfinlabs, thanks for the suggestion! Can you open a new feature request for it please? |
Sure, no problem. See #65986. |
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 settingautoStart: 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
The text was updated successfully, but these errors were encountered: