How do I fix visual studio code not showing up as an option for external script editor?

When I open a script in Unity it opens to visual studio code, but VSC as an external script editor option doesn’t appear, only code.cmd. I have all the extensions, (unity, C# etc) but nothing’s working, not even a redownload. What could be the problem?

VCS support in Unity has been deprecated.

I believe there’s a community tool out there to try and maintain support for it.

as stated by microsoft on their the dev blog:

note that unity no longer officially supports vscode, but vscode just started supporting unity development by this preview extension, all stated may change, and its development can end at any time
hope it helps!

The problem is always VSCode. :wink:

Just go for VS Community instead and you‘ll have fewer issues based on the number of VSCode issues on this forum, even when not put in relation (far fewer Unity users use VSCode).

Curious if any others are running into this issue with 2023.2? I have the VS Code extension installed on that side and the Visual Studio Editor package is v2.0.22. Still, no option in the drop down to change from Visual Studio to VS Code.

That’s the Visual Studio package, not the Visual Studio Code package. Two different things.

They did not claim that this is the Visual Studio Code package. The Visual Studio package handles both now.

From what I can tell, the vsc editor discovery (relevant code is here) is dependent on the program being installed in a standard known location. For Windows, that appears to be defined as being installed in a folder named Microsoft VS Code (for normal non-Insider builds) in either the default machine-wide Program Files location or %USERPROFILE%\AppData\Local\Programs. If your existing installation deviates from the normal locations, the package currently doesn’t seem to support that, so you would need to either embed and modify the package to recognize your specific install directory as a candidate, for example by adding another line similar to this one, or reinstall vsc in one of the “normal” locations.

Also, unless you have a very specific need for it, I would suggest upgrading to Unity 6 preview (current latest release is 6000.0.12f1). It’s a step upgrade from 2023.2 which is frozen with no more updates now that Unity 6 preview has superceded it.

The visual studio code package was retired. Microsoft documentation says to use the Visual Studio one.

Ah, I ended up navigating to the vs code exe and it was able to pull it up after that. Problem now is an apparently known bug when debugging - it’ll attach once and then throws an error the rest of the time.

I keep repeating myself but I’ll gladly say it again: VSCode is a crudge. It is not of sufficient quality for professional-level Unity development, and likely never will be (*). Unity does not officially support VS Code as an IDE, only Visual Studio and Rider.

Since even a beginner gets to use a professional grade IDE for free (VS Community) there is very little reason to use VS Code with Unity - exceptions being OS X and Linux where (soon) the only alternative is Rider. Rider though is well worth the $$$ if you are or intend to make $$$ with your work.

(*) = The reason I say this is the same reason why VS Code is seen as “modular and lightweight” by others: the plugin-driven nature of that thing. You need to be running many more plugins to work with Unity compared to other IDEs. Each plugin is never tested in combination with the other plugins in varying versions. Even some of the essential plugins are community efforts or even from a single developer, thus they vary in quality, updates and support.

Case in point: a relatively high number of reported VS Code issues compared to VS Community (many of which have known solutions) even though VS Community sees far greater usage out in the field.