- Home /
Visual Studio takes too long to Attach to Unity
Visual Studio takes too long to "Attack to Unity" so that I can use breakpoints and step through code while playtesting. It didn't use to take so long while the project was in the earlier stages so I would like to ask if someone has any idea what might be slowing it down so much,be it script count, asset count or something else. It takes around 30-40 seconds from the moment I click on it until I can play the game.
Answer by Thorny2000 · Aug 29, 2019 at 12:34 AM
In Visual Studio click the menu Debug->Delete All Breakpoints (or CTRL+Shift+F9).
For some reason VS takes longer and longer if you have old breakpoints. Maybe its too many breakpoints, maybe its some old breakpoints that are no longer on valid code locations after lots of edits. Either way, clearing out all breakpoints usually does the trick.
I wouldn't known that even if i searched for ages .... but why does this happened ?!
Vote this up so they'll fix it! Clearly this should be fixed.
Answer by titantomorrow · Apr 12, 2020 at 03:51 AM
Hi things to try...
1) Check your exception settings in Visual Studio. [Debug][Windows][Exception Settings] Turn off "Common Language Runtime Exceptions" unless you are are actually tracking down an exception.
2) Also you can in the [Debug][Options][debugging][Just-In-Time] options turn off "Native" Just -In_time debugging and that should speed things up as well.
3) Remove unnecessary breakpoints as suggested above.
Answer by andrenospam0 · May 23, 2019 at 09:48 AM
Got the same issue. It seemed at first Unity was freezing after I launched attach from VS but it is just painfully slow. Was working fine before.