I'm trying to use Visual Studio 2010 Remote Debugging to debug an app on an Amazon ec2 cloud machine [from here on called REMOTE) and have not been able to get it working.
0) The machines: LOCAL is running Windows 7 Pro-64 bit REMOTE is running Windows Server 2008-R2 64 bit
1) I've got the Remote Debugging monitor and whatnot on the REMOTE machine (and I have a lot of experience with remote debugging, just usually in simpler networking situations). I am using the 64 bit version of msvsmon.exe
2) The LOCAL machine's Windows Firewall is set to allow devenv.exe to send anything out.
Incoming rules allow port TCP 135, UDP 500 and 4500
Between LOCAL and the internet we have:
LOCAL Router Forwards TCP & UDP ports 1-1193 and 1195-48999 to LOCAL
LOCAL Ooma box Forwards TCP & UDP ports 1-1193 and 1195-48999 to "LOCAL Router"
I've tested forwarding with tcping.exe and port 45678 and that works, so I know the forwarding rules for the router and ooma box are working.
I've tested remote debugging to another machine on my local network and it works correctly. So if there are problems in LOCAL's firewall, it seems it could only be of scope (Private / Public / Domain). We have no domains involved here. As far as I can tell, I've checked all 3 boxes in every firewall rule I've looked at, so I don't think scope is the issue. Though I wonder about the
3) The EC2 firewall's security group settings allow inbound that I think apply: TCP 135 TCP 139 TCP 445 TCP 4015 UDP 0-65535
4) On REMOTE I've created Inbound rules to allow: TCP 135, 139, 445, and 80 UDP 137, 138, 500, 4500 (though I'm not using IPSec, as far as I know)
5) I also allow msvsmon.exe to configure the firewall to allow connections from any machine when I start it up, which is probably redundant, but at this point I'm trying everything.
6) In msvsmon, Tools > Options, I enable, "No Authentication (native only)" and check, "Allow any user to debug". Port is 4015.
7) On LOCAL I change Transport to, "Remote (native only with no authentication)". I put the REMOTE hostname in Qualifier.
Then, on REMOTE, the msvsmon shows, "Doug connected".
Great! Except I get nothing else. After a wait, on LOCAL I get, "Unable to connect to [hostname]. The remote machine is not responding."
8) I'm unable to close msvsmon on remote. I can click File > Exit, but msvsmon then freezes.
ProcessHacker on REMOTE shows these connections: msvsmon.exe (7364), [REMOTE Hostname], 3893, , , TCP, Listen, msvsmon.exe (7364), [REMOTE Hostname], 3894, , , TCP, Listen, msvsmon.exe (4232), [REMOTE Hostname], 3901, [REMOTE Hostname], 4015, TCP, Established, msvsmon.exe (7364), [REMOTE Hostname], 4015, , , TCP, Listen, msvsmon.exe (7364), [REMOTE Hostname], 4015, [LOCAL hostname], 58007, TCP, Close Wait, msvsmon.exe (7364), [REMOTE Hostname], 4015, [REMOTE Hostname], 3901, TCP, Established,
LOCAL ProcessHacker shows: devenv.exe (4624), Ducky, 58175, [RemoteHost], 4015, TCP, FIN Wait 2,
If I want long enough, the "FIN Wait 2 connection" on LOCAL goes away, but the "Close Wait" connection on REMOTE does not until I kill the msvsmon process.
9) So it seems maybe REMOTE is trying to contact LOCAL on a different port and that doesn't come through? Or...?
I'm really out of ideas. Clearly I've got something wrong, somewhere. I've tried it with both LOCAL and REMOTE's windows firewalls turned off and get the same results.