Disclaimer

Any opinions expressed here are my own and not necessarily those of my employer (I'm self-employed).

Aug 3, 2011

VS2010 remote debugging and Windows 7 firewall

*Update, 2011/09/16: The issue has been fixed in the next major release of Visual Studio.

I've had some trouble getting remote debugging going for a development server at work. Turns out there are some oddities in the way VS 2010 creates and manages the firewall entries that let the remote machine connect back to the local computer. You'd might want to read this before checking out the MSDN articles:  How to: Set Up Remote DebuggingHow to: Configure the Windows 7 Firewall for Remote Debugging.

I was working with a development server that had the remote debugging monitor installed. Others have been debugging on the server, so I was sure that the server was set up correctly. I was pretty sure my problems were caused by the setup on my local machine.

If you lack firewall rules for remote debugging, VS2010 detects this and asks you what to do:


Without giving it much thought I chose to "Unblock remote debugging from computers on the local network (subnet)". After all, the development server was somewhat "local." The remote debugging monitor reported that I connected to the server, but nothing more happened and I timed out with this error message: 
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'xxxxxxx'. The Visual Studio Remote Debugger on the target computer cannot connect back to this computer. A firewall may be preventing communication via DCOM to the local computer.
I then realized that subnet was probably a keyword here, as the server was in the same domain but on a different subnet.



The problem was, I couldn't find a way to trigger the firewall configuration screen again so I had to resort to the MSDN articles mentioned above. If you read the instructions on MSDN, you'll learn that you should add VS2010 to the Allow programs and features list in the Windows 7 firewall settings.



Alas, Microsoft Visual Studio was there, but it was all gray and disabled (I've hidden my other firewall rules). It was impossible to change its settings, so this was a dead end. After looking through the firewall rules found under "Advanced Settings", I stumbled across the inbound rules created by VS2010 (I've rearranged the columns for readability):


If you delete these rules, restart VS2010, and attempt a remote debugging session, you'll be asked again to set up the firewall. I'f you chose "Unblock remote debugging from any computer", you'll get the following rules


The firewall now allows any machine to connect to your Visual Studio remote debugging ports. It doesn't seem like a very secure setting, especially if you connect your computer to untrusted networks every once in a while. And VS2010 still wasn't configurable in the Allow programs and features list, and I wasn't able to get the remote debugging session going. I kept running into the "Unable to connect" error. After tweaking the rules I was finally able to get everything up an running. I had to set the rule to apply to the "Domain" profile, since my computer was part of a domain.


Here are the resulting rules. These would probably make sense for any computer which is part of a domain (though you should tighten up the "Remote address" setting).


After manually updating the firewall rules, VS2010 also became configurable in the Allow programs and features list!


The VS2010 automagic firewall configuration feels somewhat unpolished. I consider it a bug that the firewall rules created by the wizard render VS2010 unconfigurable in Allow programs and features list. For the record, my VS2010 is fully patched.

I didn't find much help on the Internet so I decided to blog this — I assume I'm not the only fast clicking guy on the planet trying to remote debug with VS2010 from a Windows 7 computer that's part of a domain.

28 comments:

  1. I did all the steps mentioned, and I still can't get it to work. This windows security stuff is depressing.

    ReplyDelete
  2. Thank you. This post hepls me a lot.

    ReplyDelete
  3. 1. Go to Control Panel\System and Security\Windows Firewall\Allowed apps
    2. select "microsoft visual studio" in the list
    3. click "details..." button
    4. click "Network Types..." button
    5. tick "domain", "private", "public" options
    6. click ok

    done.

    ReplyDelete
  4. Vermont: Although your Tar High heel lost inside ACC event semifinals, they had Duke to the basics meant for most of the initial half. Justin Knutson, who's got formulated some sort of experienced circumference gameplay, together with a foul-free Fran Acai berry II include the first considerations.
    March Madness

    March Madness Live

    March Madness Live Stream

    March Madness 2017

    Yes, we all know Level Couple has never produced one more Some. That group, filled using skilled scorers which might additionally lock straight down opposing team, will be your partner's earliest
    March Madness 2017 Live

    ncaa March Madness

    ncaa march madness live

    ncaa tournament

    March Madness Bracket

    ncaa final four

    When you’re even now on the fence about that 8-9 game, or would like your consensus opinion on the Previous 3 recommendations, we’ve gained you taken care of with a standing of all 68 matchups inside contest. It's simple to together with help make your choice on some of those mid-major darlings you’ve ended up eyeing for worried potential.
    March Madness

    March Madness Live

    March Madness Live Stream

    March Madness 2017

    March Madness 2017 Live

    ncaa March Madness

    ncaa march madness live

    ncaa tournament

    March Madness Bracket

    ncaa final four

    Villanova: The very best over-all seedling. Inspite of the team’s point inside toughest region (the Distance, by means of matchups vs Duke in addition to SMU looming), Villanova’s three-man a particular problem core from Jalen Brunson, Josh Hart together with Kris Jenkins has the potential to reiterate when domestic champs.

    ReplyDelete
  5. Get Ready To Watch Sweet 16 Live Stream Time, TV schedule, and how to watch March Madness Online Tv Coverage. Low Price To Watch Men’s basketball Championship HD Link Available From any Time any where by any device. 2017 NCAA Division I Men’s Basketball Tournament Final being played national champion for the 2016–17 season.

    Sweet 16

    Sweet 16 Live

    Sweet 16 Live Stream

    ReplyDelete
  6. Get Ready To Watch March Madness 2017 Live Stream Watch NCAA Tournament Final Online Tv Coverage. Low Price To Watch College basketball HD Link Available From any Time any where by any device. 2017 NCAA Division I Men’s Basketball Tournament Final being played national champion for the 2016–17 season.

    https://madness-march.us/


    March Madness

    March Madness Live

    March Madness Live Stream

    March Madness 2017

    March Madness 2017 Live

    ncaa March Madness

    ncaa march madness live

    ncaa tournament

    March Madness Bracket

    ncaa final four

    ReplyDelete
  7. Get Ready To Watch UFC 210 Live Stream Cormier vs Johnson 2 PPV (pay-per-view) Fight Online Tv Coverage.

    UFC 210

    UFC 210 Live

    UFC 210 Live Stream

    UFC 210 Main Card

    UFC 210 Fight Card

    UFC 210 Full Fight

    ReplyDelete
  8. Watch NFL Draft - 2017, Mock, Live Stream, Watch, Online, Tv Coverage. The first round of the NFL will take place Thursday night in Philadelphia, Pennsylvania.

    http://draft-nfl.org/

    NFL Draft

    The NFL Draft

    NFL Draft Live

    NFL Draft Live Stream

    NFL Draft Live Streaming

    NFL Draft 2017

    NFL Draft 2017 Live

    NFL Draft 2017 Live Stream

    2017 NFL Draft

    NFL Mock Draft

    NFL Mock Draft Live

    NFL Mock Draft 2017

    NFL Draft Bracket

    NFL Mock Draft Game

    NFL Mock Draft 2017 Live

    NFL Mock Draft 2017 Online

    NFL Mock Draft 2017 Live Stream

    Fans need to know what time to tune in to the NFL draft to see what their team will do with its top-10 overall pick.

    NFL Draft 2017: How it feels to be picked for the pro ranks.

    Comprehensive NFL Draft news, scores, standings, fantasy games, rumors, and more.

    ReplyDelete

Copyright notice

© André N. Klingsheim and www.dotnetnoob.com, 2009-2015. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to André N. Klingsheim and www.dotnetnoob.com with appropriate and specific direction to the original content.

Read other popular posts