Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.

To start remote debugging an ASP.NET 2.0 app (assuming the app is up and running on the remote server):

  1. On the remote server start the Visual Studio 2005 Remote Debugger.  For this you need to have the VS2005 Tools installed (not necessarily the full VS2005).
  2. On your local machine, within VS2005 select Debug - Attach to Process...
  3. In the Qualifier field (in the Attach to Process screen) enter the name of the remote server and press ENTER.
  4. Select the IIS worker process (w3wp.exe) that is running your web app* and click Attach.

* This is the tricky part - as there is nothing on this screen that helps us identify which of the w3wp.exe process is the one we want.  To determine this:

  1. Log on the the remote server and start a command prompt session.
  2. Run the following script: c:\windows\system32\iisapp.vbs.  This script will list all the currently running w3wp.exe processes, listing their PID and application pool id.
    The application pool id is the only relation between the pid and your app. 
  3. Use the apprioriate PID to identify the correct w3wp.exe on the Attach to Process screen.

HTH

Tim

Posted on Tuesday, August 8, 2006 10:56 AM C# .NET , ASP.NET , IIS | Back to top


Comments on this post: Remote debugging with ASP.NET 2.0 - finding the process id (PID) of the worker process.

# re: Remote debugging with ASP.NET 2.0 - finding the process id (PID) of the worker process.
Requesting Gravatar...
Thank you for your help,I do all you said and attach the w3wp.exe
and I set the break point on a asp.net founction,but when I click
the button , the process didn't break,and I can't catch anything I want.
Could you tell me why I can't do these?
Left by Kelvin on Jul 18, 2008 12:22 AM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net