I had the same problem described here, new install of Ubuntu 18.04 LTS. I installed VS Code from conda.
Discovered that if you run the following
code --verbose
It will tell you what is going on with Code. In my case
code --verbose
[main 20:19:26] Startup error:
Error: EACCES: permission denied, mkdir '/home/<user>/.config/Code/CachedData'
sure enough the folder ~/.config/Code had root access permissions for some reason. Deleted the folder using sudo.
rm -rf /home/<user>/.config/Code
Tried again to run code and it working fine.
Answer from Robin G on askubuntu.comWhy can't I open Visual Studio Code on Linux? - Stack Overflow
visual studio code 1 fails to launch on ubuntu using xrdp - Stack Overflow
Visual Studio Code installed but won't open?
Run the Terminal app then launch Visual Studio Code from the command line via the command code. Does that work? My guess is your container is not running and sometimes you have to launch Terminal first to get it to fire up. If Terminal won't open as well then you should try restarting Termina VM via crosh with the comand vmc stop termina and vmc start termina. Then launch Terminal, then launch code. If it starts from the shell it should launch from the icon in the Launcher. If all that fails try a power off and cold start and try again.
Visual Studio Code can't run in Ubuntu 18.04 - Stack Overflow
Videos
I had the same problem described here, new install of Ubuntu 18.04 LTS. I installed VS Code from conda.
Discovered that if you run the following
code --verbose
It will tell you what is going on with Code. In my case
code --verbose
[main 20:19:26] Startup error:
Error: EACCES: permission denied, mkdir '/home/<user>/.config/Code/CachedData'
sure enough the folder ~/.config/Code had root access permissions for some reason. Deleted the folder using sudo.
rm -rf /home/<user>/.config/Code
Tried again to run code and it working fine.
I had the same problem. Like Robin G and Nezir suggested I realized that the owner of the /home/user/.config/Code directory is the "root". However, You could just change the ownership of that directory instead of removing it.
sudo chown -R $USER "$HOME/.config/Code"
"-R" option is needed to recursively change the ownership of all the files and directories under the target directory.
After this the Visual Studio Code v. 1.27 on Ubuntu 18.04 works as it is supposed to on my machine.
Hey guys, I'm new to this (just got my chromebook yesterday and have zero experience with linux). I've just installed Visual Studio Code using the commands from the wiki on this sub and it installed just fine, but won't open. It shows up in my launcher but when I click it it appears blacked out with a perpetual loading symbol on the shelf. From there the only thing I can do is close it. Anyone know a fix for this? I need Visual Studio Code for my university and I'd rather not lug my heavy/shitty windows laptop with me to and from uni (I walk and my windows laptop weighs about 10 pounds). Thanks in advance.
Run the Terminal app then launch Visual Studio Code from the command line via the command code. Does that work? My guess is your container is not running and sometimes you have to launch Terminal first to get it to fire up. If Terminal won't open as well then you should try restarting Termina VM via crosh with the comand vmc stop termina and vmc start termina. Then launch Terminal, then launch code. If it starts from the shell it should launch from the icon in the Launcher. If all that fails try a power off and cold start and try again.
Here are the steps I used - https://kmyers.me/blog/chromeos/running-visual-studio-code-on-chromeos-via-project-crostini/
May I ask what Chromebook you have as code will fail on arm based machines