-
Notifications
You must be signed in to change notification settings - Fork 292
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
Local tasks #168
Comments
Right now you can't do this and would need to open a new window. also I'm not sure it makes sense for tasks as they're contained within the folder itself on the remote? I was discussing the terminal case with @roblourens as we've both felt the need to open a local terminal, the only issue is it could potentially get very confusing which terminal is running on which machine. |
I understand tasks are in the remote folder which can be in a remote workspace. But, could it be possible to open a folder and/or workspace in both side as in the extension view where you have a remote and a local view ? This could be the same for terminal, linked to the folder/workspace. Switching from one view to another by the explorer view or by a button in the status bar. |
+1 for local terminal, this would also solve the issue that ssh agent is not forwarded with current remote terminal. Can't typing 'exit' just fall back to local terminal? |
@ardikaveh the terminals are run by design on the machine and leverage through the same connection as everything else, that's what makes various terminals features like links and reflow on Windows work. If we were to support something like this it would likely be a special "Open Local Terminal" command. |
I have a workflow where I SSH from my local machine to the production server in order to pull changes from the development server. So a local terminal not being there means I have to open a new window for that as well. Alternatively to allowing a local terminal in the SSH remote session/workspace, in my specific case, it would be nicer to allow opening terminals directly to other SSH hosts in my SSH config file. |
This "special option" is exactly what I've been searching for. I have several extensions installed which can open various shells (PS, CMD, WSL, Git Bash) as a one-off question of which one to open, but this doesn't work while connected to a container. PGP problemsSimilar to what is said in #72, I am not able to utilize the GPG signing of commits (or tags for that matter) inside of containers, for the necessary (key-) files are stored outside of said containers. Accessing those key-files is crucial when signing ones work, and doing so from within a container would likely require the use of volumes, which would need to be mounted accordingly - a task which has proven to be rather challenging, given the limited configuration options made available to the user by the Remote Development Extention. SSH problemsFurthermore, an SSH connection must be established (again, using key-files) which have to be mounted, as copying (private-) key-files into a container is unacceptable. Collaboration-friendly configurationsWhen collaborating with others, everyone uses their own keys. Everyone has their own Git configurations and everyone has configured their Git installation accordingly. Which leads us to containers, as they need the mounting of the same files (notably with different contents) by different people. This container configuration (for example the While the Remote Development Extension provides automated configuration of the containers Git installation (via auto-mounting), this only works for the Git configuration. The paths to the various key- and configuration-files on the devices of all collaborators is unlikely the same amongst all of them. It is thus required to be able to configure the mounting of such files dynamically, for the Remote Development Extension to fulfil its intended Please provide the functionality to mount the GPG and SSH keys required for development into the containers to be used by the Remote Development Extension. Being able to open local terminals would be an acceptable workaround for the time being. |
Forked off just terminal into #730, tasks isn't done yet. |
I second this request: Currently tasks in My current use case is pushing a docker image to a private repo without having to login inside of my terminal. |
Thanks @Tyriar for the local terminal. I can use directly my bat script from the VSCode window. |
The local terminal does not open in the local root directory for a workspace, while in other places in the UI you can switch seamlessly between the local and remote view of the filesystem. |
This feature would be great for my workflow. I'm using the Remote Tools to edit python files within a container in a docker-compose network, and I'd like to be able to use tasks to configure and control aspects of other containers. |
This comment has been minimized.
This comment has been minimized.
To give my justification for why I want the ability to do this: I'm coding within a docker image that was specially designed to offer the ability to compile C/Rust to a somewhat obscure platform, and rather than having to do all the clunky configuration and extra work it would be to set this up locally, I just do my VSCode dev within this image. The emulator for the platform, however, is a GUI program that runs natively/locally on my host machine. As it is now, I have to compile the program in the dev container, then switch to a separate terminal on my host machine and run the emulator on the output. What I would like would be a complete set of "build in dev container and then run on local machine" chain of tasks/launch configurations. This currently seems unattainable, and it's making my work more tedious. |
If use cases help: I inherited a project that includes local development scaffolding via a series of Docker containers, which I run under WSL2. I opened the workspace in a WSL window (based on the remote extension), and I can write tasks that run in WSL. Now, I want to connect to these running containers from a browser on the local desktop. Normally, I make a task in Code that launches Chrome with a dev/debug profile, separate from my day to day browser. I don't want to install Chrome under WSL (is that even supported?), I just want to hit the "launch task" shortcut I'm used to, pick the "Debug Chrome" task, and have it run |
Curious to know when this feature request shall go |
My use case related to this feature is creating dev containers using git hooks. I am writing it, if in case anybody is interested in it and may be someone can help me with some alternative methods.
Now here is the problem; inside the container post-checkout and post-merge triggers won't work. Its because they run in the context of the container's terminal and they can't find It would be nice if we can pipe commands from container terminal to local terminal and view its output, without opening a separate local terminal. As per this feature request, we have been talking about local tasks, so that can be a subset of it I guess. |
I do a mixture of local (Windows) and remote (Windows) development on the same code. I have build tasks that I want to run locally or remotely depending on if I'm working locally or remotely. I also have some other tasks that can only run on the local machine (Windows). These tasks are stored in user tasks.json so are available in all workspaces. Hence I'd like a way of specifying that a task always be run locally. |
I have Django server container to which I have attached the vs code instance. My plan with local tasks is to run docker logs command in the local terminal automatically as the remote vscode instance starts up. |
This feature would also really benefit those doing embedded work in VS Code. When I want to debug something on a device, I have to start something like OpenOCD on the host machine, and then my launch.json attaches to that. It would be nice if I could have a task that starts OpenOCD on the host machine with the proper settings for my project, and just have the launch script run that task. |
I'd also love to run local tasks when connected to a remote container! My use case is that I don't want to clutter my local machine with various development environments and would rather cross-compile inside of a dev container. The current problem with this is I have to manually download and run the build on the destination host. If I could execute a local task I could rsync and run locally which would greatly improve cycle times. For now I may setup a task to push code to my destination machine from the container then manually run it, or something similar, but it'd be great to run local build task to do it all at once. |
I do lots of Yocto build on a server with lots of resource but need to download back the generated images (long complicated paths) to my local host where the boards are connected, flash them, etc. I'd like to be able to have a single workspace where all the tasks are defined, but be able to specify in the tasks if they should run on the remote or the host. |
I think this would help for my use case too. I'm developing a full-stack web app inside a dev container, and want to be able to launch a browser on the host, configured for remote debugging in VS Code. |
There seems to be several requests over time, is there any plan to support this feature in the near future? I think this would be very helpful for many people. |
I am using a server under Linux to be able to compile my app (my computers need to be on windows) but I need to transfer the result (a binary file) in local then flash this bin in a microcontroller.
I would like to be able to :
I did not see anything in the documentation for this.
Also, following the architecture of extensions, I do not think it will be possible to have extension which work both sides with remote and local commands i.e. building remotely, retreiving and uploading locally (case of micropython IDE).
The text was updated successfully, but these errors were encountered: