Open rubensa opened 2 months ago
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
This would be great, for now, we have to copy our default tasks in all our workspaces :-(
I feel like it worked already before...
P. S. VSCode: 0 Me: 1
"customizations": {
"vscode": {
"settings": {
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "echo Hello"
}
]
},
P. P. S. I found some section in docs (or some info that it might work that way) year ago or so, but yes it took a while.
@sandy081 I didn't know this works: "tasks"
is shown as unknown configuration setting in the remote settings, but the task is shown in Run Task
and correctly runs.
It is working because tasks
are loaded as part of settings
.
@sandy081 Should it become part of the schema?
It is not official to support tasks inside settings. Its an implementation detail. To support it officially, you should have a separate tasks
section in devContainer.json and create the tasks file in the remote machine, just like settings.json.
@sandy081 From your answer I suppose that the launch configuration in devcontainer.json is also not supported (just another implementation detail)?
But this is "documented" as a setting.
// Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces. "launch": { "configurations": [], "compounds": [] },
User launch configuration is supported as a setting, but, IMO it is not the right way and hence user tasks use a separate file.
Looks like, currently, only launch configurations are supported inside devcontainer.json.
You can define launch configurations in devcontainer.json like:
It would be great to have the same but for tasks. Something like:
This way we could have a set of predefined launch and tasks configurations available in the devcontainer (and checked in the git repository, as they are inside the devcontainer.json file) and allow the user to "extend" those configurations locally (by adding them to .vscode folder that might be added to .gitignore).
NOTE: I suppose this should also be added to .code-workspace settings implementation (as, under the hood, looks like devcontainers are using the workspace settings mechanism) and documented in default settings.