-
Notifications
You must be signed in to change notification settings - Fork 30.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
Run the default build task from launch configuration #32239
Comments
The ITaskServer offers API getTasksForGroup where debug could as for build tasks. So instead of using the name debug could use a generic pre launch name. |
Adding a "preLaunchBuild" attribute to launch configs results in a proliferation of common attributes.(which we want to avoid). I would rather prefer to have a standard name for the "default build" so that IntelliSense could suggest a good default value. @dbaeumer do I understand you correctly that the default build task is not available under a standard name? If this is the case, I suggest that we introduce a variable for that: "preLaunchTask": "${defaultBuildTask}" |
A standard name or a variable are both good alternatives to my suggestion. Thanks! |
@weinand no there is not since the name could be something already defined in a gulp file. However what users can do is to give a task and
which IMO is enough to denote the standard build task. I have no problem if the ITaskServer offers API to retrieve the standard build task(s). |
@isidorn @alexr00 I'd like to resolve this and I see the following two options (under the assumption that I do not want to add a new common attribute to launch configs:
I prefer the first option (the variable). @isidorn I've created #79625 for the missing code completion on the |
@weinand agree that we should not add a new common attribute to @alexr00 please note that the |
I like All of the work for this is in the configuration resolver and in tasks. I will aim to do it in September. |
@alexr00 makes sense. However currentyl the |
* Contributable variables for configuration resolver Fixes #32239
@alexr00 adding verification needed here, if you plan to write a test plan item feel free to remove the label. Also unassigning myself since you did all the work. |
Currently, I can specify a
preLaunchTask
field in a launch configuration to run a task before launching. That's great! To use preLaunchTask, I need to give my task an identifier first. Typically, I want to run the default build task before I launch, though. VSCode already knows which task is the default build task, so I feel like there should be a way to tell VSCode to run this task without giving it an identifier.If one of my tasks.json entries contains the following snippet, VSCode knows that this is the default build task:
What if there were a field in launch.json named something like
preLaunchBuild
that could be set totrue
to tell it to run the default build task before launching?preLaunchTask
would still be useful for running other tasks, but if I just want to run the default build task, I don't need to take the extra step of giving the default build task its own identifier.The text was updated successfully, but these errors were encountered: