16

whenever i try to open my vs code editor, nothing happens it doesn't launch and even there are no errors..!! And i am confused what's wrong here in my vs code. Please anyone help me fix it..!!

Below are the verbose command i typed in the terminal..

C:\Users\Avinash>code . --verbose

[main 2020-05-10T05:17:56.317Z] Error: UNKNOWN: unknown error, mkdir
[main 2020-05-10T05:17:56.318Z] Lifecycle#kill()
[main 2020-05-10T05:17:56.320Z] [File Watcher (node.js)] Error: UNKNOWN: unknown error, stat 'c:\Users\Avinash Maurya\AppData\Roaming\Code\User'
p4avinash
  • 548
  • 2
  • 4
  • 15

17 Answers17

16

no need of Unistalling, just go to your vscode-setup and reinstall it. (by this procedure all of your's settings, files , extensions etc.. will be restored as it is.)

Ajay jangid
  • 711
  • 9
  • 9
4

I also came across the same issue.

Uninstalling and Reinstalling it again worked out and all my extensions were there already(that was strange).

Debu Shinobi
  • 2,057
  • 18
  • 21
  • This worked for me. and all the extensions started installing themselves once I reinstalled VSCode. Some settings were removed, but all the extensions were in place. Also, I observed that the verbose command was not working earlier. – VISHNU SANTHOSH Aug 03 '23 at 07:44
3

You may want to try "Run as Administrator".

Chien Nguyen
  • 109
  • 1
  • 6
3

try this it worked for me!

  1. got to the Microsoft store
  2. install vs code form there
  3. then an error massage will appear
  4. now try to open your vs code and wait ...
prit
  • 33
  • 2
2

try code --no-sandbox in kali linux

1

You can try by searching vs code and if it opens you can right click it, create the shortcut and use it instead of the old shortcut. This worked for me so please try it.

Stu
  • 30,392
  • 6
  • 14
  • 33
God Mod
  • 11
  • 1
1

I Have Got the Same Problem as you just open the folder where you have downloaded VS Code. Like in My case its in Drive C and open from icon in that folder.

1

you can fix this issue by selecting run this program as administrator under compatibility tab.

user247841
  • 139
  • 1
  • 1
  • 4
1

Here is the best solution:

No need to uninstall or do anything.

I was also facing the same issue. Go to task manager. You'll see that visual studio code is running. Select it and press end task. Now you can open vscode normally. It's fixed!

0

Somehow I had two vs code installs on my computer (one user and one system) and they appeared to be conflicting. I uninstalled user and everything worked. I suggest uninstalling all versions and reinstalling using the system installer executable.

Galen Howlett
  • 530
  • 4
  • 12
0

Just reinstall the vs code from previously downloaded setup, everything including extensions get restored. enjoy coding

Manoj T V
  • 1
  • 1
0

If you are on win10, kill all vscode processes, delete folder 'C:\Users\xxx\AppData\Roaming\Code', and launch vscode again.

amazingthere
  • 992
  • 8
  • 10
0

if anyone is still wondering abt it, Microsoft ended support for Windows 7 in January, 2020 and no longer provides security updates. VS Code desktop versions starting with 1.71 (August 2022) will no longer run on Windows 7 and you will need to upgrade to a newer Windows version to use later versions of VS Code. Thus, if you want to keep windows 7 version, you have to download an older version than 1.71 of VS Code , for example, 1.69 version (https://www.filepuma.com/download/visual_studio_code_64bit_1.69.1-32681/) and uncheck all the auto updates from the settings. whenever you want to add any extension, you just have to choose the older version of it.

safa
  • 1
  • 1
0

If you cannot open the vs code editor on windows 7, then you need to download the latest version 1.70.2 from July 2022, which is supported by windows 7. Here is a link as an example: https://update.code.visualstudio.com/1.70.2/win32-x64/stable

0

Clear the contents in the file C:\Users\<PC>\.vscode\argv.json.

Due to some update this file might be crashed. After clearing, I am able to open VS code as usual.

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
0

Visual studio code recently disabled access to unc (windows network drive) paths by default, unless they are on an allow-list.

I suspect there's a bug where if your windows user profile is mounted on a unc path, this can prevent vscode from starting up

First, launch vscode from the command prompt and see if there's an error like

Error [ERR_UNC_HOST_NOT_ALLOWED]: UNC host 'some-unc-host' access is not allowed

If so you can workaround by doing

set NODE_UNC_HOST_ALLOWLIST=some-unc-host

where some-unc-host is the host name for the error, then launching Code.exe. This fixed it for me.

See

https://github.com/microsoft/vscode/issues/182070 https://code.visualstudio.com/docs/setup/windows#_working-with-unc-paths

0

On my Win10 system, the root cause was that the 1.79 update actually moved the executable file Code.exe from here:

C:\Users\u109755\AppData\Local\Programs\MicrosoftVSCode\bin

to here:

C:\Users\u109755\AppData\Local\Programs\MicrosoftVSCode\_

I believe this is why the re-install solution works, because it resets everything to point at the right location. Hope this helps someone else.

adamt8
  • 308
  • 1
  • 7