Are you unable to open or launch the Visual Studio Code application on your Windows, macOS, or Linux desktop PC? Are any changes you made not being updated in real-time?
Visual Studio Code is an incredibly popular free and open-source code editor most developers use globally. It is a powerful, highly-customizable tool that streamlines the coding procedure, making writing, debugging, and managing code easier. In addition, it is versatile and highly extensible, with the ability to cater to the needs of every developer via integrating its vast library of extensions, which makes it an ideal choice for any developer, novice or seasoned.
But just like other software Visual Studio Code is also prone to crashes due to bugs or random errors. So if you are unable to open Visual Studio Code on your PC, don’t worry. You are not alone.
In this guide, we go over nine solutions that you can try to fix your Visual Studio Code not opening.
Table of Contents
- 10 Fixes for When You Can’t Open or Launch Visual Studio Code
- 1. Restart VS Code/Your PC
- 2. Update the Graphics Driver (For Windows)
- 3. Remove the Backup of Open Files
- 4. Disable Hardware Acceleration
- 5. Disable Extensions
- 6. Run VSCode as an Administrator (For Windows)
- 7. Disable AntiVirus Temporarily
- 8. Check for Updates
- 9. Analyze Log Files
- 10. Reinstall VSCode
10 Fixes for When You Can’t Open or Launch Visual Studio Code
1. Restart VS Code/Your PC
The first step to fixing the problem is to use the decade-old technique of rebooting your system. This simple fix can resolve most issues interfering with the opening of visual studio code. Usually, other applications or background processes interfere with the normal functionality of VS Code, causing it to crash or not load properly.
Therefore sometimes it is optimal to start VSCode from scratch. To proceed with this action, save all of your previous work, then stop all your installed extensions by closing VSCode. Following that, you can relaunch the VS Code application.
Apart from restarting Visual Studio Code by either closing the application and opening it again, you can open the command palette and enter the following command:
2. Update the Graphics Driver (For Windows)
An outdated graphics driver is among the most common reasons which cause VSCode to crash. An outdated graphics driver does not permit the user to run any programming apps and usually crashes your system, especially if your program is long. Proceed by using the windows update feature to update your driver. Here’s how:
Method 1: Updating GPU Drivers through the Device Manager
The first method we recommend trying is updating through the Device Manager settings. To do this, right-click the Start menu at the bottom left and select Device Manager. Subsequently, under Display adapters, right-click the GPU drivers available, and select Update driver.
After that select, “Search automatically for updated driver software”, so your PC can begin searching online for any available updates. If there are updates available, it will immediately start downloading and installing it.
Finally, repeat the same steps for your other GPU drivers on the list as well.
Method 2: Updating GPU Drivers through Windows Updates
- First, open the Settings app in Windows and click on Update & Security.
- Next, select Windows Update.
- After that, click on Check for updates.
- Windows will now search for updates, including updates for your graphics driver. If an update is available, click on the Download and install button to install it.
To manually search for GPU driver updates, you’ll need to find the GPU model for your PC through the System Information. After that, head over to the official site of your GPU manufacturer to search for updates for your specific GPU model. The following are links to the GPU driver download pages, which you can visit according to your GPU model.
There is no native way to update the graphic drivers on macOS. However, one can check and install pending software updates on their macOS device that may include updates for various components, by going to System settings, General, and Software Update.
After updating your graphics driver, reopen VSCode and see if the issue resolves.
3. Remove the Backup of Open Files
If your VSCode stops or freezes abruptly and then crashes, you must delete some files. Removing the backup of open files helps to free up space on your system which ensures that VS Code runs smoothly and efficiently without crashing.
To begin with this fix, launch Run, paste
“%AppData%” and click the “OK” button.
Next, navigate to the “Code > Backup” directory and delete the only folder within it. Afterward, restart VSCode to see if the issue persists.
4. Disable Hardware Acceleration
If the issue persists, then you can try disabling GPU Hardware Acceleration. This forces VSCode to use Software rendering, resulting in a much more stable and smooth experience. To do so, follow the steps given below.
- Launch Visual Studio Code on Your Device
- Press Ctrl+Shift+P to bring up the command palette
- Type out the following phrase “Preferences: Configure Runtime Arguments” in the Command Palette and then hit Enter.
- Afterward, add the command
"disable-hardware-acceleration": true, to the file that appears.
- Make sure to save changes by pressing Ctrl+S.
- Now restart VSCode to see if the fix has resolved the issue.
5. Disable Extensions
While VSCode extensions can enhance the program’s functionality, they can become a nuisance, sometimes causing VSCode to crash or not load properly. If you recently added a new extension to your VSCode or updated an existing one, consider disabling it.
Begin by disabling all extensions and then reopening VSCode. If it opens successfully, without crashing, then it is highly likely that one of the existing extensions is the problem.
The technique is to enable your extensions individually to identify the potential problematic extension. After identification of the problematic extension, disable or remove it from VSCode.
Follow the steps below to execute this fix:
Disabling All Extensions
- Open VS Code.
- Press Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (macOS) to pull up the Command Palette.
- Type in “Disable All Installed Extensions” and select the command from the list that appears.
Disabling Extensions Individually
- Start VS Code.
- Click on “File” in the top menu bar.
- After selecting “Preferences,” select “Settings.”
- Choose “Extensions.”
- A list of the installed extensions will be displayed. Choose the gear icon next to the extension you wish to disable by finding it.
- Then choose “Disable.”
- Now the extension will be turned off.
6. Run VSCode as an Administrator (For Windows)
Sometimes VSCode crashes or fails to open after you’ve installed a new Windows update due to permission issues. Therefore if you are running VSCode on a Windows device, try running the software as an administrator.
- Begin by right-clicking on the Visual Studio Code shortcut and selecting Run as Administrator.
- If VSCode runs smoothly, you need to modify the permissions for your user account.
7. Disable AntiVirus Temporarily
Sometimes VSCode fails to open due to an Antivirus that interferes with its operation. First, try temporarily disabling your antivirus software to see if VSCode opens successfully. If this fix works, then make sure to add VSCode to your antivirus software’s whitelist to prevent it from being blocked in the future.
8. Check for Updates
Usually, outdated versions of VSCode can cause issues resulting in premature closure or crashing of software. Check for updates by clicking on the gear icon in the lower-left corner of the screen and selecting “Check for Updates.”
If an update is available, then download and install it. This will fix any bugs that were present in the previous version.
If you encounter issues with updating your Visual Studio Code application, you can check out our other comprehensive guide for resolving such issues here.
9. Analyze Log Files
VSCode creates log files that may contain useful information about why it is not running. Navigate to
%APPDATA%\Code\logs (on Windows) or
~/.config/Code/logs (on Linux/macOS) to view the log files.
10. Reinstall VSCode
If you are still facing problems and none of the fixes mentioned before seem to work, then the issue is likely due to a corrupted VSCode file. Therefore you should try reinstalling VSCode on your device.
To fix the issue, you should Uninstall Visual Studio Code and then redownload and reinstall the software to see if the issue persists.
For steps to uninstall and reinstall the Visual Studio Code application on your desktop (Windows, macOS, Linux), you can refer to our complete guide on that here.
All the solutions described above will help you troubleshoot your problems as to why you can’t open Visual Studio Code. We are optimistic that these fixes will eliminate your problem quickly and enable you to run VSCode smoothly.
Lastly, let us know in the comments:
- Did any of the solutions work for you?
- Is there a solution that you would like to add to the list?
- Were you also unable to fix issues with your VSCode?
Feel free to share this article with your fellow developers!