Solving VS Code Crashes at Startup On Ubuntu 24.04: A Personal Experience

Solving VS Code Crashes at Startup On Ubuntu 24.04: A Personal Experience

If you're a developer using Visual Studio Code (VS Code) on Ubuntu 24.04 and experiencing crashes at startup, you're not alone. I recently faced this issue myself and after some trial and error, I found a solution that worked. Here, I'll share my experience and the steps I took to resolve the problem.

The Problem

Today, I encountered a frustrating problem with VS Code on my Ubuntu 24.04 system. Despite several attempts to uninstall and reinstall the software, it kept crashing at startup. Initially, I suspected it might be a bug in the software itself or a compatibility issue with my system.

The Diagnosis

After multiple reinstallations and much frustration, I realized that the issue was with the Snap Store version of VS Code. The Snap package seemed to have some compatibility issues causing the crashes.

The Solution

I decided to switch from the Snap Store version to the .deb package available from the Official VS Code downloads page. Here’s the step-by-step process I followed:

1. Uninstall the Snap Version of VS Code

First, I removed the Snap version of VS Code from my system to avoid any conflicts.

sudo snap remove code

or You can also remove it from the app store.

2. Download the .deb Package

Next, I downloaded the .deb package from the official VS Code website.

3. Install the .deb Package

After downloading, I used the apt command to install the .deb package. Replace code_1.90.0-1717531825_amd64.deb with the actual file name you downloaded.

sudo apt install ./code_1.90.0-1717531825_amd64.deb

4. Launch VS Code

With the .deb package installed, I launched VS Code, and it worked perfectly without any crashes.

Conclusion

Switching from the Snap version to the .deb package resolved the issue for me. If you're facing similar problems with VS Code on Ubuntu 24.04, I recommend trying this solution. It appears that the Snap package may have some unresolved bugs or compatibility issues on this particular version of Ubuntu.

Key Takeaways:

  • Identify the Source: In my case, the Snap Store version was the problem.

  • Use Official Sources: Download the .deb package from the official VS Code website.

  • Install with apt: Using apt to install the .deb package can resolve compatibility issues.

I hope this solution helps you get back to coding without any interruptions. If you continue to face issues, consider reaching out to the VS Code community for further assistance. Happy coding!

Follow me on Twitter for more updates.