Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I can't use debugger with Visual Studio 2022

Discussion in 'Code Editors & IDEs' started by Supreme_Marshal, Feb 19, 2022.

  1. Supreme_Marshal

    Supreme_Marshal

    Joined:
    Feb 9, 2022
    Posts:
    1
    I am trying to debug something with my code. I followed a tutorial on how to debug with visual studio for Unity and he say to click attack to unity. But when I click attach to unity inside visual studio, I get this error: No connection could be made because the target machine actively refused it 127.0.0.1:56160

    I am still new with Unity. I think I may have missed a step to make it work. Can anyone help me please?
     
  2. darkavengerpark

    darkavengerpark

    Joined:
    Jun 22, 2021
    Posts:
    2
    I have the same problem
     
  3. SorneBachse

    SorneBachse

    Joined:
    Dec 27, 2012
    Posts:
    62
    Same issue here. Seems to happen whenever I switch back and fourth between debug and release mode (little bug icon down right corner), while also attach/detach in visual studio.

    Unity version: 2021.3.0f1
    Microsoft Visual Studio Community 2022 version: 17.1.5
     
  4. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    135
    Guys, did you created a bug report for it ? It won't be resolved otherwise...
     
  5. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    How to report it, I am having the same annoying problem.
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,287
    Help -> Report Bug
     
  7. Nad_B

    Nad_B

    Joined:
    Aug 1, 2021
    Posts:
    598
    That's one of the main reasons that pushed me to try Rider (and never came back to VS for Unity dev). This VS problem is annoying and happens often and sometimes nothing fixes it except a full PC reboot.
     
    stonstad likes this.