VS Code Won’t Launch – How to Fix It
Short description: VS Code not working? Learn how to fix Visual Studio Code errors and crashes on Windows. Step-by-step guide with CMD commands, cache cleanup, and performance optimization tips to restore normal operation. :contentReference[oaicite:0]{index=0}
When This Problem Occurs
- After a failed VS Code update when the icon disappears or the app freezes.
- When a VS Code crash happens due to corrupted cache or extensions.
- If a Visual Studio Code error appears because of GPU or driver conflicts.
- After installing new software that blocks VS Code from launching.
- On low-performance PCs with limited RAM and system resources.
Step-by-Step Solution
- Check running VS Code processes in Task Manager. Press Ctrl + Shift + Esc, find all Code.exe or Visual Studio Code processes. Right-click and select End Task. This removes stuck instances preventing launch. If nothing is running, continue. Open CMD as administrator: press Win + R, type cmd, then Ctrl + Shift + Enter. Run: taskkill /f /im Code.exe. Press Enter and confirm processes are closed.
- Clear VS Code cache and settings. Press Win + R, type %appdata%, press Enter. Locate the Code folder and delete User, Cache, and Logs folders. Also check %userprofile%\.vscode and rename the extensions folder to extensions.bak. This removes problematic extensions causing crashes. In CMD run:
rmdir /s /q “%APPDATA%\Code\User”
rmdir /s /q “%APPDATA%\Code\CachedData”
rmdir /s /q “%APPDATA%\Code\CachedExtensions”
Restart your PC and try launching VS Code again. - Disable GPU acceleration. If VS Code fails due to graphics issues, create a shortcut for Code.exe (usually in C:\Users\YourName\AppData\Local\Programs\Microsoft VS Code). Right-click → Properties → in Target field add –disable-gpu. Click OK and launch via this shortcut. Alternatively run: code –disable-gpu. This fixes blank screen and crash issues, especially on Intel/AMD integrated graphics.
- Run in compatibility mode. Right-click Code.exe → Properties → Compatibility. Enable “Run this program in compatibility mode” and select Windows 8. Also enable “Run as administrator”. Apply changes. This helps on older Windows 10/11 builds. If the crash relates to WS2_32.dll, check Windows Update and install all updates.
- Reinstall VS Code completely. Download the latest version from the official website. Remove the app via Settings → Apps → Visual Studio Code → Uninstall. Delete leftovers in %appdata% and %localappdata%. Also check Program Files (x86). In CMD:
winget uninstall Microsoft.VisualStudioCode
winget install Microsoft.VisualStudioCode
After installation, launch the app. If the issue persists, check logs in %appdata%\Code\logs and update .NET Framework.
Helpful Tips
- Use code –disable-extensions to run without extensions and diagnose crashes.
- Update GPU drivers via Device Manager or official tools (NVIDIA / AMD).
- Install .NET Desktop Runtime 6.0+ for better stability.
- Back up settings from %appdata%\Code\User\settings.json before cleaning.
- Add –no-sandbox to shortcut parameters to speed up launch.
Common Mistakes
Users often skip cache cleaning, causing repeated Visual Studio Code errors. Running VS Code without closing existing processes leads to conflicts. WS2_32.dll errors are usually caused by outdated network drivers. Avoid installing extensions immediately after reinstalling—first test the clean setup. If crashes started after Windows updates, check Event Viewer (Win + R → eventvwr). Avoid running VS Code from USB drives—install it on drive C:. Another frequent issue is incomplete uninstall—always remove %appdata% data and clean registry entries.
FAQ
Does this work on all Windows versions?
Yes, the guide applies to Windows 10, 11, and older versions like Windows 7 (with updates). On Windows 7, always use –disable-gpu.
Will this affect system performance?
No, cleaning cache can even improve system speed. VS Code runs efficiently after optimization.
Does this work on laptops?
Yes, especially useful for hybrid GPU setups (Intel/NVIDIA). You may need to disable the discrete GPU.
Should I restart my computer?
Yes, especially after clearing cache and settings. Restarting resolves most crash issues.
Do I need to uninstall the old version first?
Yes, always remove previous versions completely to avoid repeated errors.
Can Windows updates cause this issue?
Yes, updates may conflict with GPU or network drivers. You can roll back updates if needed.
How to check if the issue is fixed?
Run code –status in CMD. If status is OK and VS Code launches quickly, the problem is resolved.
Can I use older versions of VS Code?
It is not recommended, as older versions may not support modern extensions.
What if the problem returns?
Create a .bat script with cleanup commands and run it before launching VS Code. Also scan for malware.
Conclusion
By following these steps, you can effectively fix issues where VS Code won’t start, crashes, or shows errors on Windows. Regular cache cleaning, disabling GPU acceleration, and monitoring processes will ensure stable performance and faster startup. Applying proper system optimization techniques helps maintain smooth operation of Windows applications.

