今天不爽,远程调试的时候远程端无法连接,找了半天原因,原来Vista网络访问限制很严的,Remotedebuger用的几个端口没加入, 用下面的命令加上:
netsh advfirewall firewall add rule name="Microsoft Visual Studio Remote Debugger - UDP 137" dir=in action=allow enable=yes localport=137 protocol=udp
netsh advfirewall firewall add rule name="Microsoft Visual Studio Remote Debugger - UDP 138" dir=in action=allow enable=yes localport=138 protocol=udp
netsh advfirewall firewall add rule name="Microsoft Visual Studio Remote Debugger - TCP 139" dir=in action=allow enable=yes localport=139 protocol=tcp
netsh advfirewall firewall add rule name="Microsoft Visual Studio Remote Debugger - TCP 445" dir=in action=allow enable=yes localport=445 protocol=tcp
当然这个命令要在System Administrator组下的成员才能加。
本文介绍了在Vista系统中遇到的远程调试连接失败的问题及解决方案。通过在SystemAdministrator权限下使用netsh命令添加防火墙规则,开放了必要的UDP和TCP端口,使远程调试得以实现。

被折叠的 条评论
为什么被折叠?



