2
votes

I am running Visual Studio 2010 and attempting to debug an ASP.Net application deployed to IIS. Here is what I have already checked:

  1. VS is in debug mode and the pdb files have been generated and are in the proper directory
  2. I have unchecked the "Enable Just My Code" box in Debug options.
  3. I have confirmed that the supported runtime is set to v2.0.50727 in the web.config.
  4. I have enabled IIS anonymous authentication and confirmed the app pool is targeting ASP.Net 2.0.
  5. I have recompiled and re-deployed and confirmed that the dll versions are the same.

I am able to see the ASP.Net worker process (w3wp.exe) in the Attach to Process dialog, and I have set the "Attach To:" option to "Managed (v2.0, v1.1, v1.0) code". I click "Attach to Process" and the process appears in the Process tab.

But: the Modules tab is empty and my breakpoints are never hit. I have hovered over the breakpoints and I do not see the "this breakpoint will never be hit" message.

Am I missing something?

1
would be ideal if you could post a screenshot. did you CLEAN the solution then rebuild? why cant you run it form within visual studio rather than attaching the process? did you run in admin mode if you have UAC turned on?Ahmed ilyas
Very nice post btw - you have detailed all of the things I would have said as been tried already. Unfortunately I can't think of anything else :(samjudson
What happens if you run the project in debug mode (F5)? do the breakpoints get hit then?markpsmith
I've run into a case where debugging would fail if http keep-alives weren't enabled. Take a look at technet.microsoft.com/en-us/library/cc772183(v=ws.10).aspx to verify they're on.Lynn Crumbling
Dealing with question to which worker process to attach to, I successfully use following command: C:\Windows\System32\inetsrv\appcmd list wpeXavier

1 Answers

0
votes

Posted from OP's question

UPDATE: I solved it--I was attaching to the wrong w3wp.exe process.

In my Attach to Process dialog there are two w3wp listed. I kept attaching to the first one which was labeled "Managed (v.2.0.50727) with user name "IIS APPOOL" and I assumed it was the correct one.

However, once I attached to the second instance, labeled "T-SQL, Managed (v2.0.50727) user name: SYSTEM, everything worked.