If you opened VS Code today and your Unity Debugger wasn’t working or it was having issues detecting Assemblies, check if your C# extension updated to 1.21.13. They renamed the package, which was a breaking change.
Download an older file, then in your extensions panel click the three dots in the upper right corner and select “install from VSIX…”. Install whichever older version you downloaded (1.21.12 and older should work.)
While you’re at it you might want to disable auto update extensions in your VS Code settings.
While you’re at it you might want to disable auto update extensions in your VS Code settings.
2020-04-02 Edit
I am now able to work successfully using the latest versions of all software. I am using:
VS Code - 1.43.2
C# extension (omnisharp) - 1.21.16
Debugger for Unity extension - 2.7.5.
VS Code Unity Package - 1.2.0.
2020-10-19 Edit
The latest Omnisarp (1.23.4) is broken today. My current working settings are:
VS Code 1.50.1
C# extension (omnisharp) - 1.23.2
Debugger for Unity - 2.7.5
VS Code Unity Package - 1.2.2
Helped me too! Thank you for this. On a tight deadline and ofcourse this kind of problems with VsCode starts appearing… Finally took me only 30mins to fix it with those advices!! (would have been less but wanted to download something after the reset)
Thanks for this! I’m still having an issue however; installing v1.21.12 has got my C# extension working again, but now vscode is failing to find a whole lot of assemblies. Omnisharp log is full of entries like:
Unable to resolve assembly ‘c:\Users\USERNAME\Unity Projects\PROJECT\Temp\bin\Debug\UnityEngine.TestRunner.dll’
It is able to resolve some assemblies however, including Unity.Mathematics and a couple others.
If you are on version 1.1.4 of the VS Code package, downgrade to 1.1.3, close Unity and VS Code and then reopen. There is a separate known issue in that package that is causing errors.
What do you mean VSCode package? The person you quoted said they installed version 1.21.12 of the extension, is that what you’re referring to? What version 1.1.4 are you referring to?
I just tried updating to the latest debugger, and C#/Omnisharp 1.21.14 and autocomplete and suggestions were still broken. Not sure if others are having this issue, but I’m reverting to my workaround for the time being.