Visual Studio Code inside Company network - visual-studio-code

Is there a standard way to handle Visual Studio Code inside a company network, in which VS Code is not allowed to contact the Internet?
For e.g. Eclipse, we can host our own update sites for plugins and can package pre-configured versions of the IDE for the developers.
Is there something similar for VS Code?

There are two ways (I know of) how you can provide pre-configured VSCode-installations
A) VSCode inside a Docker container. You'll have a minimal standard installation of VSCode on your computer, all plugins and settings come with the Docker image that is loaded into your local VSCode installation. See docs here: https://code.visualstudio.com/docs/remote/containers
B) VSCode web. This is a zero-installation version of VSCode which is running in the web browser. See docs here: https://code.visualstudio.com/docs/editor/vscode-web You can try it on GitHub: open any repo and change .com in the domain to .dev

Related

Change default extensions location for remote development in VS code

I have a visual studio code installed in a desktop. As I don't have any runtime environments installed in it, the source code repository is kept in the remote server where the runtime and other dependencies are available, so SSH connection is established from the VS code to update the source code.
I'm installing few extensions using VS code in the remote server where the source code and runtime are available. It gets installed in my home directory(/home/myname/.vscode-server)by default on the remote server.
As I have very limited disk space in my home directory, I want to change the extension location of vs code. Can you guide me here?. Your insights will be helpful. Thank you !!!
PS: Can't install VS code in the remote server due to limited access rights.
It has been well discussed on GitHub under https://github.com/microsoft/vscode-remote-release/issues/472 and remote.SSH.serverInstallPath is the current solution.

Visual Studio Code offline installation

Is there a possibility to instal "Visual Studio Code" offline ? (with no Internet connection)
Best Regards
You can easily download the official installer from
https://code.visualstudio.com/download# (I took the System Installer version)
Therefore download the binaries on another machine.
Extensions can be installed from visx file.
https://marketplace.visualstudio.com/items?itemName=ms-vscode.powershell
extension name can bee looked up in VSCode itself:
VS Code extension identifier
Then install the extension.
where to find the button
That should be IMHO enough.
You surely already managed to install VS Code. For people who google a solution this could be helpful.

Developing Flutter with VSCode and WSL2

Since I mostly develop Web, using nginx, PHP and MySQL, I have ported my WebDev-environment entirely to WSL2.
Since performance is very important, all my web-related projects reside on the WSL2-vhdx file /home/user/Projects/Web. In WSL2 I've installed all my necessary tools for a nice and neat Linux-like experience, Docker, GIT, etc.. This combined with VSCode remote integration works very well.
Now, I'm digging into building Flutter-Apps, and my Flutter-environment is installed on the Windows side. My Flutter-related projects reside on D:\Projects\Flutter which is a partition, and NOT USED in WSL2 in any way. Building Flutter-apps with flutter-windows-sdk and VSCode works neatly.
But, the problem is: Now I've my project files scattered all across my computer. Web-stuff in a WSL2-vhdx-file and Flutter-stuff on the D-partition.
Is there a way to build flutter-apps with Flutter, while having the project-files stored on a WSL2-vhdx-file, in combination with VSCode-remote and an Android-emulator?
I tried creating a test Flutter-project on the \\wsl$ network mount, which didn't work.
Moving my web-related project files to the D:\ partition of Windows is no option, since the I/O mounts in WSL2 are extremely slow.
I got it working, reliably with adb connect 192.168.xxx
For anyone interested, see my full blog post here: https://dnmc.in/2021/01/25/setting-up-flutter-natively-with-wsl2-vs-code-hot-reload/
Is there a way to build flutter-apps with Flutter, while having the project-files stored on a WSL2-vhdx-file, in combination with VSCode-remote and an Android-emulator?
I'm assuming (based on the mention of VS Code Remoting) that you want to run the extension in WSL. I haven't tried that specifically, but I have run Flutter inside WSL and also connected a VS Code Remoting session to an Android emulator in the cloud, so I would expect this to work.
You'll need to make sure you set up the Flutter SDK inside WSL (so you can run flutter commands inside WSL - it should be the Linux version of the Flutter SDK and not the Windows one if you're using the zip).
To have your emulator show up in flutter devices from inside WSL, you will likely need to run adb tcpip 5555 from the Windows side (this means you need an Android SDK in Windows) - this will tell your phone to listen on TCP port 5555. Then you'll need to run adb connect [phone ip]:5555 from inside WSL (this means you'll need an Android SDK in Linux). If all goes well, the phone should then show up in adb devices and also be picked up by the device selector in VS Code.
I tried creating a test Flutter-project on the \wsl$ network mount, which didn't work.
It's not clear what went wrong here, though my first guess would be that maybe the UNC path isn't supported - if you map a drive letter to it does it make a difference?
While this isn't an officially supported setup, feel free to raise issues in the Dart-Code repository on GitHub with any issues you have. It's not a priority, but I would like for VS Code Remoting (including WSL and Docker) to generally work for Dart and Flutter dev.
Anytime you're crossing/sharing the file-system boundary from windows to wsl you're paying a massive cost in speed/time.
With the setup you've described I'd consider trying to self-host the browser based VSCode.dev inside wsl - checkout details instructions here: https://medium.com/geekculture/3-steps-to-code-from-anywhere-45401247f479
Personally I've settled on running VSCode and docker inside a Linux VM on Windows, and have a 96% time saving in things like running up a server and watching code for changes making this setup my preferred way now.
The standardisation of devcontainer.json and being able to use github codespaces if you're away from your normal dev machine make this whole setup a pleasure to use.
see https://stackoverflow.com/a/72787362/183005 for detailed timing comparison and setup details

Are suggested extensions computed locally or remotely?

I noticed today that VSCode is recommending plugins to me based on what applications I have installed locally.
For instance, if I hover over the recommended Sublime Text Keymapper, it tells me it is recommending it because I have Sublime Text installed.
Does anyone know if the matching between my installed apps and available extensions is done locally, or if the list of known installed apps is sent to a server somewhere?
It's local. Here's the code for it: https://github.com/Microsoft/vscode/blob/2b251d6e5ebefc2acdc6e73aae92ac2339b4984b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts#L734
The non oss build just ships with a static mapping of executables names to extensions

Running Odoo Enterprise Studio from code (Eclipse)

Where is the Odoo Studio code? Is it part of the Odoo Enterprise code on Github (which I have access to)?
Is there something I need to enable or add to the project so I see the Studio?
Currently when I run the Odoo Community code, (with the addons path in odoo.conf set correctly first to the enterprise directory) I see no Studio option in the header.
So two questions:
Where is the Studio code and how do I access it?
What do I need to do so I see it, when running the Odoo code from Eclipse?
1) Studio code is the one of the module inside the Odoo Enterprise addons with named "web_studio". For that you need the access of the Enterprise addons.
2) After installing the module web_studio you can get the one icon on top right corner before logged in user name like tools with tool tip "Customization". By clicking on that you can start the Studio for manage any changes inside the current screen.
I hope you are getting both of the answer correct fully.