- Home /
Unity Editor 'actively refused' attaching debugger
(Unity 3.2 / Monodevelop 2.4)
If I have the editor running, and try to 'attach' the debugger using the button in Monodevelop, I get the expected screen to select the process and debugger, but when it tries to attach, I get this error message:
No connection could be made because the target machine actively refused it 127.0.0.1:56972.
Any ideas what might be causing this and how to fix it?
Answer by Tak · May 02, 2011 at 10:35 AM
This should be fixed in Unity 3.3
There is more to it... Hm I battled this error with Unity 3.40f5 and $$anonymous$$ono 2.4.2 (WIN 7 Pro)
Start up Unity, double-click a script or click open in the Inspector. Problem already... $$anonymous$$ono comes up but does not come on top of Unity, the button on the TAS$$anonymous$$ BAR darkens, I have to click it to bring $$anonymous$$ono in focus... (Note: ...after this ordeal, low and behold it now does come up on top, as expected... beats me... has never done that in months!?)
in $$anonymous$$ono Click RUN - Attach Process boom! ERROR... machine refuses to connect mono & Unity blow out
- Re-start Unity
Unity/Edit/Preferences
check 'Allow attaching debugger to editor'
the only other I have set is 'Refresh Automatically'
Built-in $$anonymous$$ono?! or monoDevelop, don't understand, both attach, $$anonymous$$ono comes up just the same, states(Unity) in the App Title bar for both!? monoDevelop is the setting I use.
STILL NOT RESOLVED - Depending on how tangled up you got in trying everything while having to kill Unity and/or $$anonymous$$ono, and for example restarting Unity after making changes in preferences to see if they stick, AND YOU NOW $$anonymous$$NOW EVERYTHING IS SET CORRECTLY - still it can lock up and refuse, even after restarting Unity and $$anonymous$$ono, and even a warm boot!?
Haaa! re-import SUCCESS- (THAT GOT IT TO WOR$$anonymous$$!) Select the script you want to debug, right-click it, re-import I have no idea what the re-import does - the script is $$anonymous$$e, is no-where else on the system to be imported from!?
more to it... so now on your next run, no breakpoint yellow bar!? ...when mono blows up it may also blow out all your breakpoints, so make sure they are there, or it will fool you that it failed again!
...surely something's bound to come up for 7... stay tuned (lol)
Don't care for credit, hope it helps you - DingBEN.
@maria-dev... SORRY, I added a clarification on 5. above... explicitly stating SUCCESS, ins$$anonymous$$d of semi-implied as I had it. the point is that the checked solution is NOT complete, I am able to debug without an upgrade needed. Now if my version had been as Ipsquiggle, then yes I would have upgraded... what my scenario demonstrates is that one can still have the problem with a 3.3 or higher version, since there are more than 1 reason this occurs.
Answer by Caiwen · Jan 12, 2012 at 08:07 PM
how to fix it. I am in same trouble
You don't have to spam the site. One comment if enough.
You should upgrade to the latest version of Unity. It is solved in Unity 3.3. Also make sure that your firewall is not blocking connection from/to Unity.
Answer by Caiwen · Jan 12, 2012 at 08:07 PM
I am in the same trouble. Could please tell me how to solve it?
Answer by Martin.n.stauber · May 09, 2012 at 03:33 PM
A possible solution to this is to ensure you are allowing the debugger to attach to the unity editor.
The check box to allow the debugger to attach is in:
Edit->Preferences->General->Allow Attaching Debugger to Editor