1

Background:

At work I develop either in a virtual machine on my Windows laptop, or in a desktop workstation via a remote desktop app. Both environments are Ubuntu.

I have recently started to enjoy using VSCode, with the Remote SSH plugin. But I have to manually copy my setup .vscode/ folder to each project. I work actively in 10-20 projects, which makes this a bit of annoying.

All projects have the same setup and file structure, and both environments are setup the same. It feels like I could automate this more.

Using 3rd party tools is not applicable for me, since I cannot install whatever I want. Native support is important.

Question:

Is there any way for me to setup VSCode settings and tasks on my hosting Windows machine, but use them on the remote side after starting an SSH session of VSCode?

Smartskaft2
  • 468
  • 3
  • 16
  • create a MultiRoot workspace, add all your projects, define your settings in the `.code-workspace` file, in GUI this is the `Workspace`, define a global/user `tasks.json` file, maybe you can do that with `launch.json` too. You are working with a Virtual Workspace (file system) and you want to be able to partially add/mount your local file system. The remote has notion of the local host, the VSC running there is kind of a screen less version. So the remote VSC needs to read files from your local system. Better to add symbolic links on the remote computer to the folder that you otherwise copy. – rioV8 Apr 21 '22 at 08:59
  • Can I achieve the links to my host computer VSC files through VSC? Or would I have to do that myself through some SSH magic? I'm quite unfamiliar with SSH, except for basic usage. – Smartskaft2 Apr 21 '22 at 10:56
  • My current solution is to create VSC files in `~/.config/Code/user/` on each machine. I guess I could add them to some personal `Git` repo and use links to a local clone, to be able to easily extend them for both environments. – Smartskaft2 Apr 21 '22 at 10:58
  • you didn't mention they are different machines, you can share files on Linux with Samba or other tool and then you can symbolic link to these shared files – rioV8 Apr 21 '22 at 12:31
  • I tried to with "either in a virtual machine on my Windows laptop, or in a desktop workstation". – Smartskaft2 Apr 21 '22 at 13:26
  • I am not allowed to grab 3rd party stuff. I should add that only natively supported solutions are applicable for me. – Smartskaft2 Apr 21 '22 at 13:27

0 Answers0