• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
7
Question by Tsaras · May 05, 2019 at 10:21 AM · visual studiodebugging

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
12

Answer by GMT · 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.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image thepigeonfighter · Dec 19, 2019 at 07:21 PM 0
Share

I love you! This worked like a charm.

avatar image chipmonk · Mar 14, 2020 at 05:59 PM 0
Share

thanks, that was a life saver

avatar image khalidhex · May 22, 2020 at 11:30 AM 0
Share

I wouldn't known that even if i searched for ages .... but why does this happened ?!

avatar image jgmakes · Dec 30, 2020 at 03:10 AM 0
Share

Wow. I had nearly given up on Visual Studio. THANK YOU.

avatar image jgmakes · Feb 01 at 03:10 PM 1
Share

Vote this up so they'll fix it! Clearly this should be fixed.

https://developercommunity2.visualstudio.com/t/if-old-breakpoints-are-being-problematic-give-user/1299019?from=email&viewtype=all#T-ND1322406

Show more comments
avatar image
1

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Ziplock9000 · Jun 13, 2019 at 12:49 PM

Yeah it can take the best part of 30 seconds now..

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Maxwel1l · Apr 02, 2020 at 12:20 PM

Wifi is versatile but super slow compared to USB because of latency UPSers

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

120 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Monodevelop and Visual Studio 2015 debugger skips frames 0 Answers

How to use NSight 2 Answers

Visual Studio won't attach to Unity, even after Vs Tools for Unity update 9 Answers

VS Code Debugger - Using UnityEngine 0 Answers

Are conditional breakpoints when debugging in VS2017 working for you? 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges