Strategies for Maintaining VSCode on Windows 11

Strategies for Maintaining VSCode on Windows 11

Richard Lv13

Strategies for Maintaining VSCode on Windows 11

Visual Studio Code is a popular IDE widely preferred by programming enthusiasts. Microsoft revamped its user interface and made it available on Microsoft Store as well. You can even install multiple extensions in Visual Studio Code to make your programming experience better.

But many users face abrupt crashes in the Visual Studio Code app which impedes their workflow. If you face the same issue repeatedly, don’t worry. We will list out multiple fixes so that you can try and resolve the issue on your computer. Let’s dive into the post.

Disclaimer: This post includes affiliate links

If you click on a link and make a purchase, I may receive a commission at no extra cost to you.

1. Terminate Visual Studio Code and Restart

Before moving on to more complex fixes for the app, completely close Visual Studio Code using Task Manager and restart it. Here’s how to do it:

  1. Right-click on theStart button to open thePower User menu . Click on theTask Manager option.
  2. Locate the Visual Studio Code process in the list of active processes.
  3. Right-click on it and click on theEnd Task option from the context menu. It will close Visual Studio Code app and all its associated processes.
    Terminate Visual Studio Code and Restart
  4. Close the Task Manager window and open the Start menu.
  5. Type Visual Studio Code and run the app with administrator privileges. Check if it encounters a crash now.

2. Reboot your System

Restarting the system is the oldest trick in the book. It might not sound effective but resolves most of the system issues. Restarting a system helps in closing all the active processes and services, clearing the system memory, and relaunching them. Due to this, any services or apps that aren’t working will also restart afresh.

Right-click on the Start button and select theRestart option from the Power user menu. After the system restarts, run the Visual Studio Code with administrator permissions and check if it crashes.

3. Disable Hardware Acceleration

Hardware acceleration can cause problems on the low-spec system running the Visual Studio app. There isn’t an option for this feature in the app settings. So, you must modify the argv.json file to disable it. Here’s how:

  1. Launch Visual Studio Code and click on theSettings icon in the bottom left corner.
  2. Select theCommand Palette option from the settings menu and click on thePreferences: Configure Runtime Arguments option.
  3. Now, enter the following command in the argv.json file:“disable-hardware-acceleration”: true
    Disable Hardware Acceleration
  4. PressCtrl+ S to save the changes to the file.
  1. Restart the app and check if it crashes now.

4. Perform a Clean Boot

Often, third-party apps and services can interfere with other apps and cause app freezes and crashes. So, to rule out this possibility, do aclean boot of your Window system with only Microsoft-related services enabled on startup.

If Visual Studio Code works fine after a clean boot, retry the clean boot while enabling some third-party service. Repeat this process until you find the problematic service or app.

5. Disable Visual Studio Code Extensions

Visual Studio Code needs extensions to extend language and debugger support for various programming languages. If you use extensions, you must find and remove the troublesome ones. Here’s how to do it:

  1. Launch Visual Studio Code and pressCtrl+ Shift + X to open the extensions settings.
  2. Click on theInstalled option to display all the extensions installed in the Visual Studio Code app.
  3. Right-click on any extension and select theDisable option from the context menu.
    Disable Visual Studio Code Extensions
  4. Repeat this process for all extensions to disable them.
  5. Now restart the Visual Studio Code app and run it for some time without any extensions. If it doesn’t crash, an extension is probably the reason behind the crash.
  6. To identify the extension, revisit the Extension settings in the app and right-click on a disabled extension. Select theEnable option.
  7. Check if Visual Studio Code encounters a crash when this extension is active. Repeat the process to find the culprit extension and remove it from the app.

6. Exclude Visual Studio Code in Windows Defender

Antivirus programs do not play nicely with apps and programs and often wrongly flag them. So, add an exclusion for the Visual Studio Code app. If you use a third-party antivirus on your system, add an exclusion for the Visual Studio Code app directory by accessing its settings. You can eventemporarily disable Windows Security and run the app to check if it crashes now.

7. Update Visual Studio Code

If you are using a very old version of Visual Studio Code and are facing abrupt crashes, then you must update the app. A new app update brings security improvements and bug fixes which could exist in the old version of the app. Here’s how to update the app:

  1. Open Visual Studio Code and click on theSettings icon.
  2. Select theCheck for updates option from the context menu.
    Update the Visual Studio Code
  3. If there is an update available, download and install it and restart your computer.
https://techidaily.com
  1. Launch the app again and use it for some time while keeping an eye out for crashes.
https://techidaily.com

8. Roll Back the Last Windows Update

Windows updates can break system features or not sit well with third-party apps. If you encounter the app crash issue after a recent update,manually uninstall the most recent Windows update on your computer. It will revert all the new changes made to your system.

9. Reinstall Visual Studio Code

If the app installation is severely corrupt and unfixable, then a simple app reset won’t be effective. Instead, you must completely remove Visual Studio Code from your system and then reinstall it.

Repeat the following steps to reinstall Visual Studio Code using Winget:

  1. PressWin + R tolaunch the Run command box .
  2. Typecmd in the text input box and pressCtrl + Shift + Enter to launch the command prompt with administrator rights.
  3. Accept the UAC prompt and click on theYes button.
  4. Type the following command and press enter key:Winget list
  5. Copy the ID of the Visual Studio Code app and paste it after the following command:winget uninstall [App ID]
    winget uninstall Microsoft.VisualStudioCode
  6. Wait for the uninstallation to complete. Restart your system.
    Reinstall Visual Studio Code 1
  7. Launch the Command Prompt with admin privileges again.
https://techidaily.com
  1. Then type the following command and press the enter key:winget install Microsoft.VisualStudioCode
    Reinstall Visual Studio Code 2
  2. It will take a while to download and install the app on your system. You won’t need to interact with the installer window or grant any permissions.
  3. Run Visual Studio Code now and check if the app encounters any crashes now.
https://techidaily.com

10. Use the Web Version

Microsoft even offers aweb version of Visual Studio Code which you can use as a temporary solution. You can sign in to the web version and sync your files and settings. Moreover, you can install a PWA from the browser of Visual Studio Code and launch it directly from your desktop.

Visual Studio Code Won’t Crash Anymore on Windows 11

Microsoft’s popular IDE is the go-to tool of programmers. If its crashes abruptly, the projects can get delayed by quite a bit. Start with basic troubleshooting and then disable hardware acceleration on your system. After that, disable extensions and perform a clean boot. Add an exclusion for the app in the antivirus program. Lastly, if nothing works, reinstall the Visual Studio Code app on your system.

Also read:

  • Title: Strategies for Maintaining VSCode on Windows 11
  • Author: Richard
  • Created at : 2024-10-28 17:14:45
  • Updated at : 2024-11-01 17:17:53
  • Link: https://win11-tips.techidaily.com/strategies-for-maintaining-vscode-on-windows-11/
  • License: This work is licensed under CC BY-NC-SA 4.0.