Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot attach debugger to w3wp

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 
like image 994
Xaqron Avatar asked Nov 30 '10 11:11

Xaqron


People also ask

How do you attach the debugger to the w3wp exe process?

Open Visual Studio in Administrator Mode, then Debug -> attach to process -> tick the check box "Show processes from all user", select w3wp.exe. Administration mode is required for debugging the source code.

How do I connect to a debugger in Windows service?

In the Options dialog box, choose Debugging, Symbols, select the Microsoft Symbol Servers check box, and then choose the OK button. The Processes dialog box appears. Select the Show processes from all users check box. In the Available Processes section, choose the process for your service, and then choose Attach.


2 Answers

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.

like image 96
Sandy Avatar answered Oct 05 '22 18:10

Sandy


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.

like image 32
R B Avatar answered Oct 05 '22 18:10

R B