[英]vs2008 attach to process, can't see which process

In vs2003 (and vs2005(not sure about that)) when I attached to a process, before actually attaching I could see which process were running under w3wp (I have a couple of websites running locally) so I knew which exact .net application I was about to debug.


however in vs2008 the window doesn't show up anymore.. now I have to attach it, come to the conclusion it was the wrong process, stop debugging and attach it to the other process (if I haven't forgot teh processid :P )

然而在vs2008中,窗口不再显示了..现在我必须附加它,得出结论是错误的进程,停止调试并将其附加到其他进程(如果我没有忘记teh processid:P )

Is there a way to "enable" that interesting window to see with .net apps are runnig in that specific w3wp process? or am i missing something obvious?


4 个解决方案


You can find out the PID - App Pool Id-combo by:

您可以通过以下方式找到PID - App Pool Id-combo:

  1. Log on the the remote server and start a command prompt session.
  2. 登录远程服务器并启动命令提示符会话。

  3. 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.
  4. 运行以下脚本:c:\ windows \ system32 \ iisapp.vbs。此脚本将列出所有当前运行的w3wp.exe进程,列出其PID和应用程序池ID。应用程序池ID是pid和您的应用程序之间的唯一关系。

  5. Use the apprioriate PID to identify the correct w3wp.exe on the Attach to Process screen.
  6. 使用apprioriate PID在“附加到进程”屏幕上标识正确的w3wp.exe。

This will produce a listing like this:


W3WP.exe PID: 4784   AppPoolId: ReportServer
W3WP.exe PID: 6564   AppPoolId: TrunkTest
W3WP.exe PID: 220   AppPoolId: v650
W3WP.exe PID: 6420   AppPoolId: v650Test
W3WP.exe PID: 7220   AppPoolId: Trunk

From: Remote debugging with ASP.NET 2.0 - finding the process id (PID) of the worker process

From:使用ASP.NET 2.0进行远程调试 - 查找工作进程的进程ID(PID)


I don't think this was ever a feature in Visual Studio.

我认为这不是Visual Studio中的一个功能。

What you probably need is iisapp.vbs.



At the bottom of the Attach to Process dialog box you should see two checkboxes:


  • Show processes from all users
  • 显示所有用户的流程

  • Show processes in all sessions
  • 在所有会话中显示流程

If you check either / both of these you should hopefully be able to see the processes you are after.



You can skip looking up the process id and scrolling through the process list to find it, and turn attaching into a one-click deal. See my answer to a related question.




粤ICP备14056181号  © 2014-2020 ITdaan.com