Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Discussion Visual Studio Debugger Not Attaching

Discussion in 'Code Editors & IDEs' started by Davex6, Mar 30, 2023.

  1. Davex6

    Davex6

    Joined:
    Mar 29, 2023
    Posts:
    49
    All working now. Installing the VS components again from the VS Installer fixed it.

    So I'm trying out the free Unity version, and everything seems ok except that breakpoints were not being hit in Visual Studio 2019. I think the problem is the VS version since there is no 'Attach To Unity Editor' in the dropdown, just Attach, after which the Unity Editor can be chosen from the List. This seems to work; however, get the 'breakpoints will not currently be hit. ' when trying to enable them.
    Not sure, but I already had VS Pro 2019 installed, and it is the Pro version that gets opened from the Unity Editor.
    Should the free Unity version be able to work with the Pro version, else how do I get it to open the correct Visual Studio version?
    While I'm here, when it is working do you have to attach the debugger every time you open a script? Or can it be done automatically?

    Edit: have now got the VS Community Edition opening, but the same thing as for the Pro Version. I understood that the 'Attach Unity Debugger' should be showing in the drop down - I only see this:

    attach debugger.png
    Intellisense is also not working, even though I followed the steps here:

    Intellisense Not Working with Visual Studio (Fix) - Unity Forum
     
    Last edited: Mar 30, 2023