locked
Debug Remote IIS Process Frequently Hangs RRS feed

  • Question

  • I am trying to debug an IIS 7 ASPNET process running on a 64 bit Windows 2008 server across my LAN. My development machine is a 32 bit Windows 7 client. It is an extremely frustrating process because VS2008 keeps hanging with its idiotic "gee, I'm busy with something, but I won't bother to tell you what I'm busy with even though I'm putting up this message box" system alert message (memo to Microsoft: fire, ASAP, whichever layers of management thought this was a good UI design decision).

    The hang generally occurs the second time I try to attach to the remote process. In other words, I am generally allowed to attach to the remote IIS process, have a debug session, and then to a detach all or stop debug. But if I try to attach to the remote process again to start a second debug session VS 2008 is pretty much guaranteed to hang.

    My only workaround is to force the shutdown of VS2008, restart it, and begin with a "fresh" instance. But even this doesn't always work. Sometimes I can get the debug process to work the way it should be restarting the app pool that runs the ASPNET site I'm debugging, but even that doesn't always work.

    I've come across lots of discussions on the web about VS2008's terrible record of hanging in the midst of various operations, including debugging. Unfortunately, I cannot find a definitive answer from Microsoft on how to make the problem go away.

    That's what I want: a definitive guide on how to configure VS2008 so I can debug >>my<< software without these stupid hangs, rather than spend my time trying to debug Microsoft's software. Can someone point me to such a resource?

    FYI, my VS2008 is up to date on all service packs. Ditto my WinServer 2008.

    - Mark
    Saturday, November 28, 2009 11:51 PM

Answers

  • Hi Mark,

    Thanks for your reply.

    Here is a tool which can help you to collect a hang dump and do some simple analysis. For complex troubleshooting, you'd better contact a microsoft support professional for further assistance.

    Have a nice day.
     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 3, 2009 5:22 PM

All replies

  • Hi Mark,

    Thanks for reporting this issue.

    The hang issue occurs when you debug an IIS worker process for a second time. The only workaround is to restart VS and IIS app pool process. If my understanding is incorrect, please let me know.

    I tried to repro the issue, but failed. My testing environment is Win 2008 x64 + IIS 7 and client is Win 7 x64 + VS 2008 SP1. I will try to find Win 7 x32 machine for another test. Please let me know if there is anything special in your repro steps.

    Also, can you do 2 quick tests and check if you can still repro the issue:
    1. Create a new asp.net application. That can help to check if it is a project specific issue.
    2. Debug locally in IIS server.

    The following blog gives a guide for how to remote debug ASP.NET in VS 2008. One thing may be related to this issue is to disable the AppPool idle timeout setting.
    http://blogs.iis.net/brian-murphy-booth/archive/2008/05/23/remoting-debugging-asp-net-applications-using-visual-studio-2008.aspx

    Please let me know if you have any update on this issue. Thanks.

     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, November 30, 2009 9:05 AM
  • No, there is no perfect workaround. Even restarting VS and the IIS app pool doesn't always work.

    I was able to come up with a workaround that's reasonably robust (i.e., it only hangs once every couple of hours). It involves restricting the debugger, when I attach to the site's process/thread, to debug only managed code. From this I presume that trying to debug native code is more difficult for the debugger to do remotely, which results in the far more frequent hangs.

    My initial ranting aside, the frequency of VS2008 hangs -- and Microsoft's apparent inability to resolve the problem or problems that give rise to them -- must be a significant embarrassment to the VS development team. I hope to ghu that VS2010 isn't as buggy in that regard.

    Is it possible to crank up the error reporting in VS2008 to at least try and capture some more diagnostic information on what happens when a hang occurs?

    - Mark
    Monday, November 30, 2009 4:41 PM
  • Hi Mark,

    Thanks for your reply.

    Here is a tool which can help you to collect a hang dump and do some simple analysis. For complex troubleshooting, you'd better contact a microsoft support professional for further assistance.

    Have a nice day.
     

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 3, 2009 5:22 PM