Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Cannot attach Debugger with any IDE, No connection - target machine actively refused it 127.0.0.1

Discussion in 'Editor & General Support' started by Warmacha, Jul 18, 2022.

  1. Warmacha

    Warmacha

    Joined:
    Dec 13, 2015
    Posts:
    22
    Spent the last day and a half trying to connect the debugger with Unity, Tried multiple versions of Visual studios and JetBrains Rider, all with the same error "No connection could be made because the target machine actively refused it 127.0.0.1: (port)".
    I am not trying to connect it to any external device, no server or website. Just in editor on my development pc.

    Steps I have taken:
    -Tried multiple IDE's including VS 2019, VS 2022, VS Code, and Jetbrains Rider.
    -Updating my Unity engine to 2021.3.6f1
    -Restarting computer multiple times.
    -Turning off Firewall
    -Manually setting it to attach to different ports
    -Rolling back last Windows Update
    -Restarting router
    -Uninstalling VS completely and reinstalling
    -Uninstalling Unity and Unity Hub completely and reinstalling
    -Reinstalling the Unity debugger tools for VS
    -Deleting and regenerating Library
    -Deleting .vs folder, .sln file, OBJ folder and all the cprojects
    -Deleting all files regarding Unity and Unity Hub in appdata
    -Clicking the regenerate project files button in external tools settings.
    -Tried on a separate project

    At this point, It must be something with my computer but I can't find any idea's on what that could be since the debugger was working a few days ago. I'm on a windows 10 enterprise machine.

    Any suggestions at this point is greatly appreciated, at wits end here.
     
    Last edited: Jul 18, 2022
  2. failmelon

    failmelon

    Joined:
    Apr 12, 2016
    Posts:
    1
    I had this problem with trying to attach debug and with hyperv/windows sandbox features enabled
     
    Armitage1982 likes this.
  3. Warmacha

    Warmacha

    Joined:
    Dec 13, 2015
    Posts:
    22
    I ended up kinda just... fixing itself? Don't know how, gave it a few days and was able to debug again fine.
     
  4. Armitage1982

    Armitage1982

    Joined:
    Jul 26, 2012
    Posts:
    35
    This just happened to me today.

    I was quite happy that I managed to re-enable Hyper-V a week ago. A BSOD was appearing since the last Windows updates when the "Intel Virtualization Technology" option was enabled in my Asus UEFI BIOS.

    Except that Windows Sandbox never worked anymore since that Windows update, same thing with Docker, so Hyper-V services becomes a bit useless on my machine (while it worked before). Anyway, I much prefer my debugger.

    Note, it is not enough to stop the services, only disabling the parameter in the BIOS worked on my side.

    Thanks for the tip.