简体   繁体   中英

Visual Studio 2010 attach to process fails

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM