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.
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.
I have this same issue. Hopefully it gets fixed soon, as I need HyperV working and still be able to debug. I don’t even have a firewall enabled and I still have problems; just keep getting the error “No connection could be made because the target machine actively refused it 127.0.0.1:56636”.
If anyone comes across this thread with the same problem, What normally fixes it for me now is ctrl+shift+f9 or remove all breakpoints, restart IDE, restart editor, run debugger again and it should connect.
I had the same problem, soved it in VS Debug > Attach Unity Debugger and try the processes until you find the correct one (in my case I had 3 it was the 2nd one). This happened after uptating Nvidea Driver Unity crashed
This worked! I think i remember doing a few years before and it worked then too.
I will have to create a sticky note and try and remember this the next time it happens again!
Thank you!
If anyone comes across this thread with the same problem, What normally fixes it for me now is ctrl+shift+f9 or remove all breakpoints, restart IDE, restart editor, run debugger again and it should connect.