Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Attach Process - Fail (iOS with Visual Studio)

Discussion in 'Code Editors & IDEs' started by Lenvanthis012, Jul 14, 2019.

  1. Lenvanthis012

    Lenvanthis012

    Joined:
    Aug 24, 2013
    Posts:
    21
    When I try to attach Unity Editor process to Visual Studio for debugging.
    Visual studio spits out.

    The operation is not valid due to the current state of the object.

    Both Unity3D and Visual Studio are pretty up-to-date.
    Unity3d is 2019.3.0a5
    Visual Studio for Mac Community 8.1.4 (Build 5).

    Anyone has the same problem? Solution?

    Thanks in advance,

    -s
     
    BenR likes this.
  2. Roflcopter-Ink

    Roflcopter-Ink

    Joined:
    Dec 1, 2015
    Posts:
    1
    Did you or anyone else find a solution for that?
    I have no problem debugging the Editor but with a iPhone Device

    Unity 2019.2.11f1
    VS for Mac Community 8.4.1
    XCode 11.3.1 (11C504)
    iPhone X - iOS 13.3
     
  3. ChrisWalsh3

    ChrisWalsh3

    Joined:
    Mar 30, 2016
    Posts:
    6
    Mine was working attaching to iOS device...(VS for Mac and iphoneX, Unity 2018.2).

    I then updated Unity to 2019.2 and VS for Mac had autoupdated. However I did NOT update iOS, so it's Unity or VS for Mac update that has broken it! Looking into this more now and will post anything I find...
     
  4. ChrisWalsh3

    ChrisWalsh3

    Joined:
    Mar 30, 2016
    Posts:
    6
    After a few hours of messing around with it, rebooting phone and my mac, I got it working. I don't think the reboots fixed it, but I previously had my mac mini on a LAN to the router and the iphoneX on wifi to the router. I pulled the LAN cable and connected with WiFi and now it's working, I think that is what fixed it...

    Unity 2019.2.17f1
    Build settings in Unity:
    Symlink Unity Libraries ON, Development build ON, Autoconnect profiler OFF, Script Debugging ON, Wait for managed debugger ON, Scripts only build OFF
    Visual Studio Community 2019 for Mac (Preview) ... Version 8.5 Preview (8.5 build 1543)

    ( probably something to do with network broadcast of packets from a wifi source not making it to the LAN connections on a router)

    Hope this helps someone out there!
     
    Last edited: Jan 27, 2020