Working with VSCode (even) when you cannot install it for some reason

Over the past few years, A lot of you all have been adopting Visual Studio Code as your primary "Code editor/workspace".

One of the biggest issues that I have, is that I really love working with VSCode and here is why that is an issue for me: For the last few weeks/months, I've had to work on (remote) environments that didn't have VS Code installed, but merely a stripped down (and old) text editor such as notepad or notepad++.

While both Notepad++ and Notepad(2) are decent tools, VSCode is of whole other level and it really helps you with the flow of things in your work! To give an example: One of the things that I really love is the fact that you can open an entire folder with it and manipulate the files in that folder (and its subfolders) in an efficient manner and without having to switch back to the file explorer (on windows) every time you need to open another file...

Having to work, without having VS Code available or without the option to install it in environments that I don't manage (and have to log on to only once or twice) really had a negative impact on my efficiency and it really feels like having to go into a fight with both of my arms tied to my back... (not that I know the first thing about physical fights 😉 ) it is for that reason that I started thinking "how great it would be to have a portable version of VS code available"...

for those of you that don't know the concept: a portable edition of an application is one that has been packaged in such a way that you can copy the entire folder to another location and you would be able to use the application just like that. In the past, this was a big thing with the rise of USB sticks where people would copy their favorite tooling onto such a drive and take it with them wherever they would go.

Today, the notion of a USB-drive is a lot less appealing to me as

  1. I store all my documents in the cloud (OneDrive (for business), Dropbox,...)
  2. the remote environments that I need to access are Virtual and a USB has not much use in that context...

The idea is still alive though and since "my work environment" lies in an enterprise context, where I have (in a lot of cases) access to my OneDrive for business, I started thinking about a way to make my (portable) Visual studio code available via that channel.

After a quick search, I immediately found the documentation on the Visual Studio Code site that explains how you can set up a VS Code in portable mode. The process is really easy:

  1. go to the download page of VS Code
  2. Choose your platform (Windows/Linux/Mac) and architecture and download the ZIP file
  3. Your file download will start and you will be redirected to a page that explains you how to get started (with VS Code)
  4. The (platform specific) info on how to set up your VS Code Portable can be found here , but the idea is simple (explained below for windows):
    1. extract the zip that you downloaded to a location (This can be a OneDrive folder, network share, synced user profile,...) that you can access from where you are going to need VS Code.
    2. Create a data folder in the root of the extracted folder. This will allow you to sync your settings (and extensions).
  5. That's it! You can start using VS Code wherever you have access to the location that you just extracted to!

Gotcha: The portable mode will not self update! You'll have to regularly update the installation by following the procedure again. Important to know/understand is that you can "move your data folder" to the "new installation" and that you will have all your settings available in no time!

So, here it is! As you can see, it is fairly easy to have a working VS Code at your disposal, even if you are in an environment where you cannot, or are not allowed to install, software.

VSCode in OneDrive, make sure to create the data folder for your extensions, settings and state!

I know that this one will help me a lot in the future when I need to get work done!


comments powered by Disqus