简体   繁体   中英

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

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?

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".

附加到远程调试器

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM