VS Code Not Opening on Windows? How to Fix When It Won’t Launch (No Errors)

TutorialPedia Team

Date Updated

Visual Studio Code (VS Code) is a staple for developers, offering a lightweight yet powerful code editor packed with features. But what happens when you click its icon, and nothing happens? No error messages, no splash screen, just silence. This frustrating issue—where VS Code fails to launch without any visible errors—is more common than you might think, and it can stem from a variety of causes, from background processes to corrupted files or system conflicts.

If you’re stuck with a non-responsive VS Code on Windows, don’t panic. This guide will walk you through step-by-step solutions to diagnose and fix the problem, starting with simple checks and moving to advanced troubleshooting. By the end, you’ll have your favorite code editor up and running again.

Table of Contents#

  1. Basic Checks: Start with the Obvious
  2. Disable Extensions (Safe Mode)
  3. Repair or Reinstall VS Code
  4. Fix Corrupted User Data
  5. Check for Antivirus/Firewall Interference
  6. Resolve System File Corruption
  7. Fix GPU Acceleration or Graphics Driver Issues
  8. Verify Registry Entries
  9. Advanced: Check Event Viewer for Hidden Errors
  10. Conclusion
  11. References

Basic Checks: Start with the Obvious#

Before diving into complex fixes, rule out simple culprits. These steps take 2–5 minutes and resolve the issue for many users.

1.1 Restart Your Computer#

Sometimes, temporary system glitches or stuck processes prevent VS Code from launching. A quick restart can clear these issues:

  • Click the Start Menu, select Power, then Restart.
  • After rebooting, try launching VS Code again.

1.2 Kill Stuck VS Code Processes#

VS Code might still be running in the background, even if no window appears. To force-quit these processes:

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Go to the Processes tab (or Details tab in Windows 11).
  3. Look for entries named:
    • Code.exe
    • Visual Studio Code
    • code.exe (lowercase, in some cases)
  4. Right-click each entry and select End Task.
  5. Close Task Manager and try launching VS Code again.

1.3 Run VS Code as Administrator#

Permission issues can block VS Code from accessing critical files. To run it with elevated privileges:

  1. Right-click the VS Code shortcut on your desktop or Start Menu.
  2. Select Run as administrator.
  3. If prompted by User Account Control (UAC), click Yes.
  4. Check if VS Code launches. If it does, the issue may be related to file/folder permissions (see Section 5 for permanent fixes).

2. Disable Extensions (Safe Mode)#

Faulty or outdated extensions are a common cause of silent launch failures. VS Code can launch in "safe mode" with all extensions disabled to test this:

How to Launch in Safe Mode:#

  1. Press Win + R to open the Run dialog.
  2. Type code --disable-extensions and press Enter.
    • This forces VS Code to launch without loading any extensions.

If VS Code Launches in Safe Mode:#

The problem is caused by an extension. To identify the culprit:

  1. Open VS Code normally (it may now launch if the problematic extension was unloaded temporarily).
  2. Go to the Extensions tab (Ctrl + Shift + X).
  3. Disable extensions one by one, restarting VS Code after each disable, until the issue reoccurs.
  4. Uninstall or update the problematic extension.

3. Repair or Reinstall VS Code#

Corrupted installation files can prevent VS Code from launching. Repairing or reinstalling often fixes this:

Step 1: Repair the Installation#

  1. Download the latest VS Code installer from the official website.
  2. Run the installer (e.g., VSCodeSetup-x64-1.85.1.exe).
  3. The installer will detect an existing installation and prompt you to Repair. Click Repair.
  4. Wait for the process to complete, then try launching VS Code.

Step 2: Reinstall (If Repair Fails)#

If repair doesn’t work, fully reinstall VS Code:

  1. Uninstall VS Code via Settings > Apps > Apps & features (Windows 10/11).
  2. Delete leftover files to ensure a clean reinstall:
    • Press Win + R, type %APPDATA%\Code, and delete the Code folder (back it up first if needed).
    • Type %LOCALAPPDATA%\Programs\Microsoft VS Code and delete the Microsoft VS Code folder.
  3. Reinstall VS Code using the official installer.

4. Fix Corrupted User Data#

VS Code stores user settings, cache, and extensions in a Code folder under %APPDATA%. Corrupted data here can cause launch issues:

How to Reset User Data:#

  1. Press Win + R, type %APPDATA%, and press Enter (opens C:\Users\[YourUsername]\AppData\Roaming).
  2. Find the Code folder and rename it to Code_old (e.g., to back up your data).
  3. Launch VS Code normally. It will create a new Code folder with default settings.

If VS Code Launches Now:#

The old Code_old folder contained corrupted data. You can:

  • Keep the new default setup, or
  • Restore select files (e.g., settings.json, keybindings.json) from Code_old to the new Code folder (avoid overwriting extensions or cache folders).

5. Check for Antivirus/Firewall Interference#

Antivirus or firewall software may block VS Code’s executable (Code.exe) or flag it as malicious, preventing launch.

How to Fix:#

  1. Check Quarantined Items:

    • Open your antivirus software (e.g., Windows Defender, Norton, McAfee).
    • Look for a Quarantine or Threat History section.
    • If Code.exe is listed, restore it and add it to the antivirus’s allowlist.
  2. Add VS Code to Firewall Exceptions:

    • For Windows Defender Firewall:
      1. Open Control Panel > System and Security > Windows Defender Firewall.
      2. Click Allow an app or feature through Windows Defender Firewall.
      3. Click Change settings > Allow another app.
      4. Click Browse, navigate to C:\Program Files\Microsoft VS Code\Code.exe, select it, and click Add.
      5. Ensure both Private and Public checkboxes are checked for VS Code.

6. Resolve System File Corruption#

Corrupted Windows system files can interfere with application launches. Use built-in tools to repair them:

Step 1: Run System File Checker (SFC)#

  1. Press Win + X and select Command Prompt (Admin) or Windows Terminal (Admin).
  2. Type sfc /scannow and press Enter.
    • SFC scans for corrupted system files and replaces them with cached copies.
  3. Wait for the scan to complete (10–15 minutes). If issues are found, restart your PC.

Step 2: Run DISM (If SFC Fails)#

If SFC can’t repair files, use the Deployment Image Servicing and Management (DISM) tool:

  1. In the admin Command Prompt, type:
    DISM /Online /Cleanup-Image /RestoreHealth  
  2. Wait for DISM to download and repair corrupted system image files (this may take 20+ minutes).
  3. Restart your PC and run sfc /scannow again to confirm fixes.

7. Fix GPU Acceleration or Graphics Driver Issues#

VS Code uses GPU acceleration for rendering, which can fail if your graphics drivers are outdated or corrupted.

Test with GPU Acceleration Disabled#

  1. Press Win + R, type code --disable-gpu, and press Enter.
    • This launches VS Code without using the GPU.

If It Launches:#

The issue is GPU-related. Fix it with one of these steps:

Option 1: Update Graphics Drivers#

  1. Identify your GPU: Press Win + X > Device Manager > Display adapters.
  2. Visit the manufacturer’s website to download the latest driver:
  3. Install the driver and restart your PC.

Option 2: Permanently Disable GPU Acceleration#

If updating drivers doesn’t work, disable GPU acceleration permanently:

  1. Right-click the VS Code shortcut and select Properties.
  2. In the Target field, add --disable-gpu at the end (e.g., "C:\Program Files\Microsoft VS Code\Code.exe" --disable-gpu).
  3. Click Apply > OK. Launch VS Code via the shortcut.

8. Verify Registry Entries#

A misconfigured registry entry (e.g., incorrect installation path) can prevent VS Code from launching.

How to Check the Registry:#

  1. Press Win + R, type regedit, and press Enter (UAC may prompt for permission).
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio Code  
    
  3. Look for the DisplayIcon or InstallLocation value in the right pane.
    • DisplayIcon should point to Code.exe (e.g., C:\Program Files\Microsoft VS Code\Code.exe,0).
    • InstallLocation should point to the VS Code folder (e.g., C:\Program Files\Microsoft VS Code).

If the Path Is Incorrect:#

Reinstall VS Code (see Section 3) to fix the registry entry automatically.

9. Advanced: Check Event Viewer for Hidden Errors#

Even if there’s no visible error message, Windows Event Viewer may log clues about why VS Code failed to launch.

How to Use Event Viewer:#

  1. Press Win + R, type eventvwr.msc, and press Enter.
  2. Go to Windows Logs > Application.
  3. Look for Error entries with a Source of Application Error or Code (around the time VS Code failed to launch).
  4. Double-click the error to view details (e.g., "Faulting application name: Code.exe, version: 1.85.1.0").

Example Error Clues:#

  • Faulting module name: ntdll.dll: Indicates system file corruption (see Section 6).
  • Faulting module name: d3d11.dll: Points to GPU/driver issues (see Section 7).

Conclusion#

VS Code failing to launch silently on Windows is frustrating, but it’s almost always fixable with the steps above. Start with basic checks (restart, kill processes, safe mode), then move to repairing/reinstalling, and finally advanced fixes like Event Viewer or registry checks.

If all else fails, check the VS Code GitHub Issues page for similar problems—other users may have found workarounds for your specific setup.

References#