Search Unity

Visual Studio 2019 - No 'Attach to Unity' debug option

Discussion in 'External Tools' started by andrewhoke, Apr 18, 2019.

  1. andrewhoke

    andrewhoke

    Joined:
    Aug 29, 2018
    Posts:
    22
    I installed VS2019 when it was released, and have been enjoying using the new features; however, I've had nonstop issues with the Unity development extension not working. No matter how I open VS, I don't get the attach option. I've tried running as admin and opening the project from the Editor in Assets->Open C# Project. I've been forced to revert to using VS2017 multiple times.

    For what it's worth, my project is currently stuck in 5.6.6f2 (yeah, I know), but I have seen this same issue when working in the QA version that is now in 2018.3.1f1.
     
  2. GeoffBot

    GeoffBot

    Joined:
    Oct 25, 2018
    Posts:
    3
    Using latest 2018 Unity build and had to revert to VS2017, all is well again. I'll wait until Unity bundles VS2019 before I try it again. Currently they still bundle 2017.
     
  3. andrewhoke

    andrewhoke

    Joined:
    Aug 29, 2018
    Posts:
    22
    Shame they would release the extension for VS2019 but not support it... :rolleyes:
     
  4. PabloAM

    PabloAM

    Joined:
    Dec 25, 2012
    Posts:
    35
    Please Unity release VS2019 support extension :)
     
    ROBYER1 likes this.
  5. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    282
    Hoping for an update on this so I can use VS 2019
     
  6. potterdev245

    potterdev245

    Joined:
    May 3, 2019
    Posts:
    1
    Until they do you can use:
    VS -> Debug -> Attach unity debugger -> double click project
     
  7. beefyt123

    beefyt123

    Joined:
    Mar 11, 2014
    Posts:
    1
    If you install the Visual Studio tools for Unity manually. The Attach to Unity option re-appears, and Intellisense is now offering unity functions for auto complete.

    1. Run Visual Studio Installer
    2. On the version of VS2019 you have installed click Modify
    3. At the top of the window navigate to Individual Components
    4. About 2/3 of the way down you will see a subtitle "Games and Graphics" make sure Visual Studio Tools for Unity is checked.
    5. In bottom right click install.
     
  8. andrewhoke

    andrewhoke

    Joined:
    Aug 29, 2018
    Posts:
    22
    This was always the case @beefyt123 and the manner in which I installed the VS Tools for Unity extension. I updated to Visual Studio 2019.1.1 today so we will see if that fixes the issue for good.
     
  9. furkan59

    furkan59

    Joined:
    Apr 18, 2017
    Posts:
    6
    it works for me you are my hero.
     
  10. BroncoBilli

    BroncoBilli

    Joined:
    Oct 8, 2017
    Posts:
    42
    Yes, the attach option works. Just today, I installed VS 2019 from scratch, ensured the VS Tools for Unity was checked, and installed Unity 2019.2.0... When I double click on the script file in unity, and it opens up VS 2019, there is no way to press the green Play button and start debugging. I MUST go and attach to unity. I don't know why Beefy's solution works, but it doesn't for me. There are a lot of options in Unity and in the VS Tools for Unity extension, I don't know what, if anything, modifying them would help with.
     
  11. andrewhoke

    andrewhoke

    Joined:
    Aug 29, 2018
    Posts:
    22
    I finally got my project upgraded to Unity 2018.3 and the attach option is working consistently. I imagine it was a compatibility issue with Unity 5.4.
     
  12. guodancoder

    guodancoder

    Joined:
    Dec 14, 2017
    Posts:
    2
    gooooooooooood
     
  13. PetterL68

    PetterL68

    Joined:
    Jun 26, 2018
    Posts:
    20
    I had first problems with the connection to Unity. After reinstall the VS 2019 it work. But when i want to lookup some commands by using Ctr+ALT + M and Ctrl + H, i get a
    search option insted and if i let it search, it takes forever.


    Edit: Tried to revert back to 2017, but the same search box appears when trying to look up
    Mono commands with Ctrl+ALT +M and Ctrl +H.
    Looks like it is the search and replace box that appear.
     
    Last edited: Aug 25, 2019
  14. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    115
    This fixed the issues! Thank you so much. After I installed VS2019, everytime I clicked on a Script it would open a new instance of VS. Now its all good!