Connecting to a remote iis server 2012 to debug a web application remotely

10,709

You need to attach the debugger to the w3wp process on the remote machine. Launch the "Attach To Process" dialog from the the Debug->Attach To Process.. menu item.

Enter the name of the remote machine that you want to debug in the "Qualifier" field. At this point if you have an RDP session on the remote machine you should see the connection being made to the remote debugger.

Now choose the w3wp process from the list to attach to IIS and choose "Attach".

Attaching to the remote debugger

If all has gone well you should see Visual Studio loading the debugging symbols from the remote machine in the status bar on the bottom left.

Now set a breakpoint in VS2012 and perform and action that will cause it to be hit on the remote website and you should break on your breakpoint.

Share:
10,709
user2216352
Author by

user2216352

Updated on July 22, 2022

Comments

  • user2216352
    user2216352 over 1 year

    Issue: Want to connect to Windows Server 2008R2 IIS Web Application with Visual Studio 2012 remote debugger with web deployed application.

    Steps to Reproduce:
    1) Fresh WinSrv2008r2 box for production
    - with web deploy service started
    - and with remote debug service started
    2) Fresh WinSrv2008r2 box for development
    - with Visual Studio 2012 pro
    3) Start new asp.net web project in visual studio 2012 on the dev box.
    4) create test variable in Page_Load event of default.aspx.vb and set it. SET A BREAK POINT here.
    5) Deploy to newly created test iis web site on the production box - successfully.
    6) navigate to the page and hope that the break point is hit.

    result: no break point is hit, however, if I just it on the dev box, I can get it to hit.

    expected result: hit the break point.

    Question: How do you set the ?target? ?process? on the development visual studio solution to pick up the application deployed over on the production machine?

  • user2216352
    user2216352 about 11 years
    Is it necessary to change from using the vstudio dev iis server to the remote "Custom Web Server" like this?
  • user2216352
    user2216352 about 11 years
    It won't let me add an screen image. In the settings for the app, there are 3 options under the "Web" section. 1) Use Visual Studio Develpment server, 2) Use local iis web server, and 3) use custom web server. When I select option 3, which is what I believe to be right??, it tells me the remote debug on the server is not configured properly.