Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
6
Question by JvanOpstal · May 08, 2017 at 01:35 PM · visual studiodebuggingattachversions

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

Hey guys,

I have a problem that's been posted on here quite a lot, but mine has bit of a twist. I have 2 versions of Unity installed on my laptop: 5.5.0f3, which I use for most projects, as well as 5.4.1f, which I'm required to use for a single project.

With the 5.4.1f version, when I try to attach Visual Studio to Unity so I can debug with breakpoints and such, Visual studio can't find any instances of Unity.

With 5.5.0, attaching works as expected.

All the other posts I found about this problem seemed to be solved by updating to the newest version of the Visual Studio Tools for Unity, but that didn't help in my case. Updating to Visual studio 2017 (I used 2015 before) didn't help either.

Has anyone encountered this problem before and found a fix or workaround? Thanks in advance!

Comment
Add comment · Show 1
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 JvanOpstal · May 11, 2017 at 01:16 PM 0
Share

Also, I don't have Xamarin installed, and the rest of my $$anonymous$$m who use the same version for the same project can attach VS to Unity without issues.

9 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by JvanOpstal · Dec 13, 2017 at 09:29 AM

I solved this issue for myself when I ran into it on a different project. My problem was that because I had 2 versions of unity installed on my pc, i had renamed the Unity.exe to more easily distinguish it from the windows Start menu. The VS Debugger seems to require the .exe to be named exactly as expected.

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
2

Answer by BrienKing · Feb 13, 2018 at 08:11 AM

I had to run Unity as Administrator for it to work for me.

Comment
Add comment · Show 2 · 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 Keenkrozzy · Apr 15, 2018 at 09:09 PM 0
Share

YES! After trouble-shooting this for hours this was the answer for me.

avatar image deathstarjim · Jul 07, 2018 at 04:34 PM 0
Share

I was running Visual Studio 2017 as Ad$$anonymous$$istrator and once I told Unity to run as Ad$$anonymous$$istrator as well, things synced up! Thanks for the tip!

avatar image
2

Answer by LCC_Coding · Jun 21, 2018 at 08:14 AM

Go to Debugger at the top in visual studio and choose "Attach Unity Debugger" then hit play, That is what worked with me, I also ran Unity as administrator. Hope that helps

Comment
Add comment · Show 2 · 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 Stevers · Aug 17, 2019 at 03:35 AM 0
Share

Wow. Both the $$anonymous$$icrosoft documentation AND the Unity documentation both left this step out. I feel like an idiot, but at the same time, I don't use Visual Studio ever.

Thank you so much for taking the time to post this. I believe this will end up being the answer that most people are looking for.

Firstly, make sure that you have the Workload installed for "Game Development with Unity" within Visual Studio. You do this during the installation process. See this documentation.

Once you do that then setup Unity to use Visual Studio as the editor. The documentation (for Visual Studio) here.

avatar image drewjosh · Oct 13, 2020 at 12:10 PM 0
Share

In Visual Studio for $$anonymous$$ac you nee to go to: Run > Attach to process

avatar image
1

Answer by Chmis · May 14, 2017 at 07:19 PM

For me going to Unity Preferences -> External Tools, choosing MonoDevelop then Visual Studio again solved the problem

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 zoomzang · Jun 02, 2017 at 11:31 PM 0
Share

I tried choosing $$anonymous$$onoDevelop and then back to Visual Studio, but it isn't working for me.

avatar image
1

Answer by amcakebread · Jul 30, 2018 at 03:24 PM

since updating to unity 2018.2.1f1 I am completely unable to attach VS to unity. I have tried absolutely everything including attempting to reinstall unity and visual studio. When I hit the attach button it just goes dark for a few seconds then back to normal as though I never touched it. No errors, no feedback whatsoever

Comment
Add comment · Show 7 · 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 aoguzkoca · Aug 29, 2018 at 01:34 PM 0
Share

I've tried all the solutions mentioned, but unfortunately I'm in the same situation. Have you resolved it?

avatar image amcakebread aoguzkoca · Aug 29, 2018 at 05:11 PM 0
Share

I'm sorry, no I haven't solved it. And all these people saying to switch to mono and back obviously don't have a recent copy of unity because they have dropped mono. I still get regular lock ups when debugging making it close to impossible to use but I do now have a suspicion that it is connected with loading assets or resources

avatar image aoguzkoca amcakebread · Aug 29, 2018 at 05:23 PM 0
Share

Thank you. I have also a $$anonymous$$ac computer. When I tried with VS for mac, I could debug it.

Show more comments
avatar image drewjosh · Oct 13, 2020 at 12:11 PM 0
Share

In Visual Studio for $$anonymous$$ac you nee to go to: Run > Attach to process

  • 1
  • 2
  • ›

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.

Follow this Question

Answers Answers and Comments

19 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

Related Questions

unity debugger operation failed ayuda porfavor 0 Answers

UnityVS not breaking on exception and missing debug info 1 Answer

Visual Studios not letting me Attach to Unity 0 Answers

Visual Studio 2015 Update 3 wont attach to Unity 5.3.4f1 5 Answers

Debugging issue Visual Studio Code 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges