VS Code User settings reset when connecting to a VM using ssh - visual-studio-code

I am used to using VS Code to work on projects locally on my (Windows) laptop. However, for a new project I'm working on, I need an Ubuntu VM, which I installed with VM Box. The issue is that developing directly in the VM is not as seamless as I would like it to be, which is why I want to connect to the VM remotely from my laptop.
I was able to connect to the VM, but all my VS Code User settings were seemingly reset or absent for the remote session. All my configurations in the settings but also the extensions were gone. If I open a local window, the settings are still there, but not in the remote session.
I get that it might be useful for virtual environments and things like that, but I don't want to have to copy all my user settings and reinstall manually all my extensions that I will use regardless of the project.
Is there any way to use my user settings for remote sessions as well?

Related

Is there a way to run an IDE like VSCode from a cloud instance?

I know that with R you can run RStudio as a browser instance directly from a server/cloud instance, so you access the IDE via browser, and that IDE has access to files/data available on that instance (similar to what Jupyterlab does).
Similarly i wonder if there is a way to run VSCode (or some other full feature IDE) as a browser instance on something like a google dataproc, so instead of using Jupyter to run code and access data, you would use the IDE.
I realize there are ways to run a local instance of an IDE and connect to a server/cloud instance, but in some cases these connections are blocked by firewalls and you have no way of running code on the instance other than via browser/jupyter, so i was wondering if there was some other way to do this.
As #guillaume blaquiere suggested :
Cloud Workstation is the brand new feature is designed for that
Fully managed development environments built to meet the needs of security-sensitive enterprises. It enhances the security of development environments while accelerating developer onboarding and productivity.
Access secure and fast development environments anytime via browser or local IDE
Enable administrators to easily provision, scale, manage, and secure development environments
Customize development environments with your preferred IDE and through custom container images

Development using remote file system in Eclipse

There is a new direction to use cloud based environment for project development. The resources are protected by a teleport bastion host. The guide is to use VS Code with teleport client plugin and use VS Code to see remote file system and develop using VS Code. Is there a way to use Eclipse to use remote file system to do development. Though there is Remote System Explorer plugin for Eclipse is available, it can work on SSH only. But the entire system is protected by teleport and there is a bastion layer. Tried searching for teleport client plugin for Eclipse, seems not available.
Is there a way to use Eclipse for development?

How to access chrome dev tools on a chromebook from another machine

I recently followed many guides about how to get the chromebook into dev mode, allow modifications by making the linux OS writable and how the forwarding works. Also opened the firewall to allow any traffic. I've entered the --remote-debugging-port=2253 and --remote-debugging-address=0.0.0.0 to the /etc/chrome-dev.conf file. The reason I entered 0.0.0.0 is because to my understanding, chrome does not by default allow remote hosts to connect and is by default only listening to localhost. (This method worked on Ubuntu, macOS and windows devices.)
Now when I start chrome and browse to localhost:2253 I indeed get to see inspectable pages. However, I cannot access these from another machine. (Even with forwarding enabled)
Is there something I am missing or doing wrong? The reason I want to access these pages is because I'm trying to run an automated remote test (with puppeteer) that takes screenshots while 'using' our application.
I've also tried to take another path and get node running on the chromebook without success. I tried doing this with NVM but When installing NVM it fails because of permissions errors. Even when running as sudo.
I hope someone can help me so I can remotely connect to the device with the chrome devtools.

VS Code Remote Development Errors

I am connected to my company's VPN on my Windows 10 desktop and uses VS Code for my development. I wanted to use VS Code Remote Development so that I can connect to my remote company development server and autosave my files directly on the server. I have installed VS Code Remote Development package and this is my SSH config.
Host my.company.server
HostName 10.XXX.XXX.XX6
User root
IdentityFile C:\Users\My_User\Documents\Company\company_key.pem
However, when connect VS Code to the remote server, VS Code shows that I am connected but I am getting the errors below and cannot view the remote directory.
Unable to write to Folder Settings because no resource is provided.
Could not fetch remote environment.
Failed to connect to the remote extension host server
(Error: Websocket close with status code 1006)
I tried connecting to the remote server using WinSCP and that works fine. I also used PowerShell to login using the below command and that works fine too.
ssh -i C:\Users\My_User\Documents\Company\company_key.pem root#10.XXX.XXX.XX6
What am I doing wrong here? Any VS Code gurus can assist me with this issue? Thanks.
VSCode was attempting to download and install several components on that remote machine, which probably was blocked by the machine administrators in your company (as downloading from an external resource is commonly seen as a security risk on an internal machine).
You should carefully review the information security policies of the company before making any violation. And then discuss with your manager to see if VSCode Remote should be used or not.

GitHub: Refresh failed: Could not connect to remote server

On GitHub Desktop (I use it on Windows), I have had this error over the last few days:
My Internet connection seems to work fine though. What could cause the issue?
Is your internet connection goes through firewall/proxy server. I found that GitHub Windows client is only reliably works when no proxy enabled. Being windows (.NET to be precise) application it takes proxy settings as they defined in Internet Explorer connection settings. Meanwhile, Git itself, which GitHub Windows client desktop application simply uses via command prompt, is governed by http and https proxy settings in .gitconfig file or environment variables. This discrepancy makes it quite sophisticated to setup.
What's interesting, is that desktop app was working the first time I installed it fresh (never had it on this Windows), but it wasn't able to connect to GitHub. Then I started to fiddle with --global http/https settings and I broke the app. Now, even uninstalling and installing it back again, I still have connectivity issues, as it seems to remember settings somewhere, as it doesn't prompt me with welcome screen and does remember my name.
Worth to mention, that even if the app complains about connection, I can clone the repo with it.
This worked for me:
In Internet Explorer: Tools/Internet Options/Connections/LAN Settings
Uncheck "Use a Proxy server..."
Restart GitHub.
You might also be able to disable the Proxy Server via Edge. In my case, I found that after turning it off in IE, it was off in Edge also.
Edit: I also had to update the GitHub application in order to be able to clone to my local repository.