You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a compound configuration, which references a preLaunchTask.
Example of a compound configuration can be found here
Verify:
The compound preLaunchTask gets executed before the launch configurations get launched
You can have a compound configuration in the workspace settings file. This compound configuration can reference a task that is defineind in the workspace configuration file.
In case of a task error, none of the compound configurations are started
It looks like with the current insiders build, I can now define "tasks" inside the .code-workspace file (in the normal build it complains it is not allowed). According to the description here, a compound can use one of these tasks as preLaunchTask; out of curiosity I downloaded the build and got it working.
However, a configuration defined in the .code-workspace file may have a preLaunchTask as well - but I cannot use it because it complains with the same error as in this comment: #58818 (comment). Is there a particular reason you're implementing the more complicated feature while the simple one (i.e. preLaunchTask for individual configs) is not supported/broken? I would expect that since tasks can now be defined in a .code-workspace file, they can also be referenced by both launch configs and compounds.
Tasks are specific to the location in which they are defined an cannot be referenced outside of that location. Example: a task defined in a tasks.json cannot be referenced from another folder's tasks.json or from a code-workspace file. Tasks are currently very tied to a folder, so any change to make them cross-folder is currently out of scope.
What I see in the insiders build is that I can define tasks in a workspace file, and I can reference them as preLaunchTask from the compounds section defined in that same workspace file => the very same thing that is described in this issue.
What I do not understand - and was trying to clarify in the previous comment - is why I cannot reference those tasks as preLaunchTask from the configurations section defined also in the same workspace file. I mean, if the tasks are tied to a folder, you've already solved this problem when deciding tasks in the workspace file are acceptable...
Activity
[-]Compound prelaunchTask[/-][+]Compound preLaunchTask[/+]coyoteecd commentedon Nov 2, 2019
It looks like with the current insiders build, I can now define "tasks" inside the .code-workspace file (in the normal build it complains it is not allowed). According to the description here, a compound can use one of these tasks as preLaunchTask; out of curiosity I downloaded the build and got it working.
However, a configuration defined in the .code-workspace file may have a preLaunchTask as well - but I cannot use it because it complains with the same error as in this comment: #58818 (comment). Is there a particular reason you're implementing the more complicated feature while the simple one (i.e. preLaunchTask for individual configs) is not supported/broken? I would expect that since tasks can now be defined in a .code-workspace file, they can also be referenced by both launch configs and compounds.
alexr00 commentedon Nov 4, 2019
Tasks are specific to the location in which they are defined an cannot be referenced outside of that location. Example: a task defined in a tasks.json cannot be referenced from another folder's tasks.json or from a code-workspace file. Tasks are currently very tied to a folder, so any change to make them cross-folder is currently out of scope.
coyoteecd commentedon Nov 4, 2019
What I see in the insiders build is that I can define tasks in a workspace file, and I can reference them as preLaunchTask from the compounds section defined in that same workspace file => the very same thing that is described in this issue.
What I do not understand - and was trying to clarify in the previous comment - is why I cannot reference those tasks as preLaunchTask from the configurations section defined also in the same workspace file. I mean, if the tasks are tied to a folder, you've already solved this problem when deciding tasks in the workspace file are acceptable...
What am I missing here?
alexr00 commentedon Nov 5, 2019
You're right, looks like that doesn't work. New issue for that: #83992