Unity Issue Tracker - Editor FPS drops when VS 2022 Debugger is attached and custom window is open
Closed
UUM-18699
Editor FPS drops when VS 2022 Debugger is attached and custom window is open
Unity: CodeEditors
Third Party Issue
2023.1.X
2022.2.X
2022.1.X
2021.3.X
2020.3.X
The problem is that something is causing a lot of `UnityEngine.ExitGUIException` to be thrown, which when a debugger is attached, even if the exception will be hidden, it is still thrown/slowing the debugger down
How to reproduce:
1. Open the attached project “VSDebuggerBug.zip“
2. Set Visual Studio 2022 as External Script Editor (Edit → Preference → External Tools)
3. Open the “SampleScene” in Scenes
4. Open the “ExampleScript.cs” script in Assets
5. Enter the Play Mode
6. Press Window → “My Window”
7. Attach Unity Debugger to the Editor
8. Hover the cursor over the “MyWindow” custom window or try making any changes to it
9. Observe the editor and “Stats” window
Expected result: FPS doesn’t drop. There’s no lag in the editor
Actual result: FPS drops. There is a lag in the editor
Everything works as expected if “MyWindow” is turned off
Also reproducible if the script is attached to unity without entering Play Mode
Workaround:
In Visual Studio:
1. Press Debug → Windows → Exception Settings
2. Add "UnityEngine.ExitGUIException" to the well-known exceptions in the Common Language Runtime Exceptions category (using the + button on the toolbar)
3. Uncheck it so that the debugger doesn't break on it
Prioritise and Follow this issue
Have a workaround or additional info about this issue?