9

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?

Glenn Slaven
  • 31,855
  • 25
  • 107
  • 163
  • 1
    Answered in http://stackoverflow.com/questions/4313206/cannot-attach-debugger-to-w3wp - tl;dr? w3wp process sleeps, so refresh page in browser and it should reappear in list. – Ruskin Jan 22 '14 at 18:51
  • Reference: http://stackoverflow.com/questions/4313206/cannot-attach-debugger-to-w3wp – LCJ Apr 11 '14 at 00:44

7 Answers7

27

Make sure you have the Show processes in all sessions checkbox checked!

Nick
  • 5,765
  • 5
  • 39
  • 59
7

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.

Glenn Slaven
  • 31,855
  • 25
  • 107
  • 163
2

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.

  • This method worked for me. w2wp process was disappread for some reason. So i followed above steps eventhough I was not debugging directly my project for what I have opend in my VS 2013. – Shai Mar 31 '15 at 19:07
1

Are you sure that the w3wp.exe process didn't die while debugging? Does it show up in Task Manager?

Eilon
  • 25,103
  • 3
  • 82
  • 100
  • Yeah, it's still in task manager. I tried doing an iisreset and reloaded the site but it still doesn't show up in the attach screen – Glenn Slaven Dec 31 '09 at 01:15
  • 1
    Have you tried restarting VS? Can you also try with VS2008 and see if it's any different? Maybe hit the "Refresh" button in the Attach to Process window? I have no idea what else could cause this... – Eilon Dec 31 '09 at 01:25
  • 1
    happens to me sometimes, if I restart VS2010 I can see w3wp in the list again and can attach. weird. – dan Feb 28 '12 at 20:21
0

You might need to be a member of the Administrators/Local Admins group for your machine.

Had this happen to me on one of our VMs today. Closing, re-opening VS2010 made no difference, rebuilding the website (!) made no difference.

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.exe appearing in the processes list for attaching.

In the absence of some other confirmation, it is possible that the act of logging out/logging-in again did the trick all by itself.

Michael Paulukonis
  • 8,540
  • 5
  • 46
  • 66
0

Try restarting Visual Studio. This worked for me.

bradley4
  • 3,407
  • 5
  • 32
  • 41
0

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

Closing Visual Studio did not help, the same goes for restarting IIS and rebuilding the solution.

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.

Erk
  • 881
  • 12
  • 8