Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    102
    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:
    39,571
    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:
    102
    Intellisense working Ok. VS Code package updated to last version.
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,937