Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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

Discussion in 'Editor & General Support' started by Gulliver, Jun 7, 2023.

  1. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    98
    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.

    ExitGUI.jpg
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    37,243
    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:

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

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

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    98
    Intellisense working Ok. VS Code package updated to last version.
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,239