Skip to content

No option to automatically terminate previous task when a new instance of the same task is started #32264

@ishanjain28

Description

@ishanjain28
  • VSCode Version: 1.14.2
  • OS Version: Windows 10 Creators Update

This is just a suggestion.

Almost all IDEs allow us to set a 'Single Instance Only' option, When this option is true, And you try to run a task that is already running, It'll kill the running task and then restart it.

VS Code gives an error stating that the task is already running, go to F1->Terminate Task to terminate the task.
This gets really annoying on some machines where to access Function keys, You also need to hold down a separate "Fn" key.

My suggestion is to let people specify a SingleInstanceOnly option in tasks.json, If this option is true, then instead of giving an error to user, It should kill the existing task and restart it.
And if this option is false, Then just do what it does currently.
Default value should be false, So, Only the people who really need this option can set it and others will see the usual behavior

And, I'd like to work on this, if that's okay.

Regards
Ishan

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitieson-testplantasksTask system issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions