- Home /
Visual Studio Code Debugger Throws Random Exception
Hi, I'm using VS Code as my IDE, I installed all the required plugins to run Unity with. It was working well the other day, but because VS Code did not know what UnityEngine.UI library is, I had to reinstall it, and this time the debugger broke.
Basically, when I launch the debugger, Unity asks me to go on Debug mode, I say OK, then my program stops -not on my breakpoints.- When I look at the Call Stack section, I see that it is paused because of some exceptions.
They are things like:
In Thread #1 -> UnityEngine.UIElements.EventDispatcher.ProcessEventQueue (Unknown Source:0)
So I try to skip those, I skip a couple of dozen of these pauses, and then I can use my debugger as usual. After that, when I click to Unity again, as usual Unity reloads the code as usual but this breaks things, and I go into an infinite loop of these errors, which in turn makes me either close the debugger -which when I try to re-run it, it completely breaks and not attaches to Unity- or I reopen the project from the beginning.
So I can use the debugger only once and then need to restart Unity.
What should I do? Thanks.