I also had the same problem..I had this problem while I was using Visual Studio 2012 Update 5.
The following link gives more better explaination on different scenarios in which this error might occur.
https://msdn.microsoft.com/en-us/library/ms164726.aspx
Link says that Visual Studio is a 32-bit application, so it uses the 64-bit version of the remote debugger to debug 64-bit applications.
The two processes communicate using the local network within the local computer. No traffic leaves the computer, but it is possible that third party security software may block the communication.
So what I did is I opened Firewall settings.
Control Panel-->System and Security-->Windows Firewall-->Allowed apps to communicate through windows firewall
And added MSVSMON.exe to the allowed apps list.This worked for me.
Note: You can find MSVSMON.exe file on following location:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64