Cannot attach debugger to w3wp

2019-01-23 23:02发布

I'm debugging an ASP.NET application but sometimes cannot find w3wp neither in Visual Studio process list (Menu: Debug -> Attach to Process...) nor in task manager. I have selected 'Show processes from all users' and 'Show processes in all sessions' check boxes. When run the project from localhost, after an unhanded exception happens debugger would attach to w3wp (too late for me to step into code) !

Why I cannot see w3wp sometimes ?

Windows Server 2008 Enterprise Edition 64-bit, Visual Studio 2010

9条回答
Root(大扎)
2楼-- · 2019-01-23 23:26

I don't how, but there appeared to be an extra application tied to the app pool I was using. Try creating a new app pool and point your application to the newly created app pool. Double check there is only 1 application with your new app pool.

查看更多
再贱就再见
3楼-- · 2019-01-23 23:33

I also encountered the same problem. Just build the project again. It would then show up the w3wp.exe in the attach process list.

查看更多
成全新的幸福
4楼-- · 2019-01-23 23:34

When you reset IIS or IIS is not running, you need to make a call to the server, when you hit the server for the first time the w3wp process starts.

查看更多
疯言疯语
5楼-- · 2019-01-23 23:39

Look closely at the URL of the page you are debugging in the off chance that it changed to a different server - something that may rarely happen but happened to me. This falls under the category of "check your assumptions".

查看更多
霸刀☆藐视天下
6楼-- · 2019-01-23 23:41

Make sure you run VS as an administrator.

查看更多
beautiful°
7楼-- · 2019-01-23 23:43

THe same thing happened to me. After an update I couldnt find the W3WP! I realized that it didnt show all the processes. Checking the checkbox 'Show processes from all user' was required.

查看更多
登录 后发表回答