visual-studio 为什么在 VS2010 中关闭 Just My Code 后无法附加到 w3wp.exe 进程?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1983439/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why can't I attach to the w3wp.exe process when I turn off Just My Code in VS2010?
提问by Glenn Slaven
I'm using VS2010 Beta 2 and I turned on .NET Framework source stepping, so I had to disable 'Just My Code'. But now the w3wp.exe process doesn't show up in the list of processes I can attach to. I've got both show all processes boxes ticked. Is this a bug or am I missing something?
我正在使用 VS2010 Beta 2 并且我打开了 .NET Framework 源代码步进,所以我不得不禁用“仅我的代码”。但是现在 w3wp.exe 进程没有显示在我可以附加到的进程列表中。我已经勾选了显示所有进程框。这是一个错误还是我错过了什么?
采纳答案by Glenn Slaven
Ok, I found how to make it work, I rebuilt the whole solution and it started seeing the process again. This doesn't make a whole lot of sense to me, but oh well.
好的,我找到了如何让它工作,我重建了整个解决方案,它再次开始看到这个过程。这对我来说没有多大意义,但哦,好吧。
回答by Nick
Make sure you have the Show processes in all sessionscheckbox checked!
确保您选中了在所有会话中显示进程复选框!
回答by mattnicolls
I fixed this by clicking Debug > Start Debugging, then once it starts up click Stop Debugging. Then I returned to the Attach to Process dialog and W3WP was in the list again.
我通过单击“调试”>“开始调试”来解决此问题,然后在它启动后单击“停止调试”。然后我返回到“附加到进程”对话框,W3WP 再次出现在列表中。
回答by Eilon
Are you sure that the w3wp.exe process didn't die while debugging? Does it show up in Task Manager?
您确定 w3wp.exe 进程在调试时没有死掉吗?它是否显示在任务管理器中?
回答by Erk
I couldn't find the process because the web page was still showing an error dialog and hadn't finished processing.
我找不到进程,因为网页仍然显示错误对话框并且尚未完成处理。
Make sure you have ended the previous debugging session (and run the web code to the end).
确保您已经结束了之前的调试会话(并运行 Web 代码到最后)。
Closing Visual Studio did not help, the same goes for restarting IIS and rebuilding the solution.
关闭 Visual Studio 没有帮助,重新启动 IIS 和重建解决方案也是如此。
As long as I was, some weird way, still attached to w3wp it did not show up in the attach list. Once I made sure the web page had finished and no dialogs of any kind was open, w3wp returned again.
只要我是,一些奇怪的方式,仍然附加到 w3wp 它没有出现在附加列表中。一旦我确定网页已经完成并且没有打开任何类型的对话框,w3wp 再次返回。
回答by Michael Paulukonis
You might need to be a member of the Administrators/Local Adminsgroup for your machine.
您可能需要成为Administrators/Local Admins计算机组的成员。
Had this happen to me on one of our VMs today. Closing, re-opening VS2010 made no difference, rebuilding the website (!) made no difference.
今天在我们的一台虚拟机上发生了这种情况。关闭,重新打开 VS2010 没有任何区别,重建网站 (!) 没有任何区别。
But I logged out, logged in as administrator, added myself to the Administrators group, logged out, logged back in as myself, and once every application was loaded up -- I could get w3wp.exeappearing in the processes list for attaching.
但是我注销了,以管理员身份登录,将自己添加到管理员组,注销,以我自己的身份重新登录,并且一旦每个应用程序加载完毕——我就可以w3wp.exe出现在进程列表中进行附加。
In the absence of some other confirmation, it is possiblethat the act of logging out/logging-in again did the trick all by itself.
在没有其他一些确认的情况下,注销/再次登录的行为可能完全靠自己完成了。
回答by bradley4
Try restarting Visual Studio. This worked for me.
尝试重新启动 Visual Studio。这对我有用。

