Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity Freeze when connecting VS Debugger

Discussion in 'Editor & General Support' started by Joe_86, May 4, 2018.

  1. Joe_86

    Joe_86

    Joined:
    Jan 12, 2015
    Posts:
    6
    Hey Guys.

    Since three days, i have a really annoying issue:
    When i connect the Visual Studio 2017 Debugger to my Unity Installation (Unity 4.x), the Editor freezes completely. There is no error message, timeout or anything else. If i disconnect the Debugger, Unity continue like nothing has happened. I have not to be in play mode to freeze the Editor with the debugger.

    This Bug is Project independent. I have the same problem with a completely new and empty Project. There is no difference if i use the Visual Studio for Unity Plugin or not.

    I use the latest Version of Windows 10 + Visual Studio 2017 Professional.

    I already tried to completely uninstall Visual Studio 2017, Unity and even the last Windows 10 Updates, but nothing seems to work.

    If i connect with MonoDevelop, everything works fine, but MonoDevelop is no alternative in my Company.

    Do you have any ideas or tips what else i can try to fix this?

    Thx!
     
  2. gtzpower

    gtzpower

    Joined:
    Jan 23, 2011
    Posts:
    241
    Ran into the same issue today (though on 2017.3.1, win 10, vs 2017). For whatever reason, if I click the "play" button that says "Attach to Unity", Unity simply locks up until I detach. I am able to debug just fine though if I go to the "Debug" menu and choose "Attach Unity Debugger". Hope that helps someone.

    EDIT: Nevermind. The problem is now presenting itself even when attaching through the menu... It worked for about 20 minutes.

    Edit again: The problem ended up being conditional breakpoints. If I have a conditional breakpoint in the project, it locks up Unity (even though it isn't hitting). The breakpoint will hit one time, and after that, nothing works. Restarted Unity, Visual Studio, even a reboot didn't get the breakpoint to work again. Removing the breakpoint resolves the issue.
     
    Last edited: May 30, 2018
    Lardalot likes this.
  3. Joe_86

    Joe_86

    Joined:
    Jan 12, 2015
    Posts:
    6
    @gtzpower: Thx for the feedback. Unfortunately, i have still this issue without any breakpoints.
     
  4. Lardalot

    Lardalot

    Joined:
    Jun 19, 2013
    Posts:
    9

    Thanks!! I haven't been able to debug properly for for days, I just deleted all breakpoints and now it's all good again.
     
    gtzpower likes this.
  5. i42-Xblade

    i42-Xblade

    Joined:
    Jan 12, 2016
    Posts:
    493
    Still happens~
     
  6. KBVDev

    KBVDev

    Joined:
    Dec 1, 2017
    Posts:
    2
    Had the same issue just now. Deleting breakpoints fixed it for me, but this bug still needs to be adressed.
    Has someone found a bug report?
     
  7. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    175
    I've just started hitting this as well, pretty big deal not being able to debug code efficiently.

    Debug works the first time in a session (clean boot), after that it just locks up every time.

    // WildStyle
     
  8. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    621
    I thought I was the only one having these issues, since we use a hot-reloading external DLL setup, I figured it must be all the crazy things we're doing the debugger just poops itself. It worked pretty alright with Unity 2017 3.1p1 and VS2015 (can't recall which VSTU version). But then as soon as we updated to latest VS2017 (15.8.4) and Unity 2018 2.6f1. The debugger freezes every single time I detach it, almost a 100% repro. I thought it must be Unity 2018, so we went back to Unity 2017 4.1f1, while it happens _slightly_ less, it still happens quite a lot, very frequent.

    Every new Unity comes in, you get all these new fancy features yet the core programming environment is not robust. We're considering all sorts of work-arounds atm, even developing our game in a separate exe, and abstracting out the rendering part, just so we could debug... Not cool, not cool.
     
  9. Hullabu

    Hullabu

    Joined:
    Oct 23, 2014
    Posts:
    12
    Same freezes.
    Tested on:
    Unity v2018.2.7f1 and Unity v2018.2.8f1, VS2015 and VS2017
    Nothing helps. Impossible to work.
     
  10. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    44
    Had the same problem, deleting all breakpoints fixed it for me too
     
  11. MichiealO

    MichiealO

    Joined:
    Jul 7, 2013
    Posts:
    59
    gee... this is fun!
    Mine was working just great until I updated visual studio. Now, it takes 5 minutes (during which both VS and the Unity Editor are frozen) to start. And, heavens help you if f-10 into something like Unity Analytics... It just hangs.

    Win10
    Unity 2018.2.8
    VS2017 15.8.28010.2026
     
  12. Cross22

    Cross22

    Joined:
    Sep 26, 2014
    Posts:
    18
    Using Visual Studio 2017 for Mac it doesn't freeze - instead it crashes the Unity process..