How to prevent VS Code stop on UnityEngine.ExitGUIException? Or how to fix it.

Hello everybody.

Unity ver 2022.3.0. Visual Studio Code ver 1.77.0

VS Code is attached to Unity as a debugger.

Each time when I press Add Component button to any game object in the scene – ExitGUIException is raised so VS Code becomes active and Unity pauses. So I can’t add components unless I stop debugging.

As you can see on the screenshot – Unity editor, not my scripts caused the exception, so I can’t fix it. I tried to add an exception to the ignored list (bottom of the screenshot) – but this not helps.

Any ideas on how to solve this problem ?

Thanks.

I’m never sure how much of this Visual Studio configuration / setup actually gets driven from the integration package used to open it… but that’s one thing to perhaps check or update. Here’s my standard blurb on that Rube Goldberg chain:

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

Barring all that, move on to other ideas:

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: No suggestions in Vscode

Intellisense working Ok. VS Code package updated to last version.

With Unity discontinuing support there is a community fork of the package if you want to give that a go.