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 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


    Jan 8, 2013
    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 ?


  2. Kurt-Dekker


    Mar 16, 2013
    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:
  3. Gulliver


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


    Oct 11, 2012