3

I'm trying to setup debugging on a class ASP project in VS 2010, and in doing that am trying to attach it's debugger to w3p.exe. I'm using Windows 7 64-bit and IIS 7.5. I've used this method successfully a few times before on another machine.

However, I'm finding that this time I am unable to attach the debugger. It's saying:

Unable to attach to the process. A debugger is already attached.

But I can't figure out what it might be. How can I determine this? Or could it be something else? I've rebooted my PC and can't yet see signs of anything running which looks like a debugger.

Setup

In case it helps, here's the steps I used to setup the environment, which I documented from my previous successful attempts:

  • Created new empty Visual Basic .NET Web (Best to create in C:\inetpub\wwwroot\, otherwise you will have security/ACL issues when loading the site).
  • Copied the contents of site folder to project folder.
  • In solution explorer, selected to show all files not in project. Selected all files and right click and select: "include in project".
  • Under project properties -> Web -> Set to use IIS and start with URL http://mysite.local
  • In hosts file pointed mysite.local to 127.0.0.1
  • In IIS setup new website pointing to the files with a host header of mysite.local
  • Go to application pools, ensured mysite.local was set to classic mode. No managed code.
  • Under ASP -> Enable Parent paths and make sure server-side debugging is enabled
  • Under error pages, make sure full details are shown.

Debugging in Visual Studio 2010

  • Run VS 2010 as Administrator
  • In your project, use Ctrl+F5 to run without debugging
  • Now, in the menu go to Debug -> Attach to Process -- This is where I fail
  • Tick show processes from all users AND show processes in all sessions
  • Make sure it is set to automatically determine type of code to debug
  • Look through the w3p.exe processes in the list, and based on the IIS POOL\site name, pick the right process.
  • Set your breakpoints and refresh -- debug as normal.
4

1 回答 1

2

您的机器上是否正在运行一些调试诊断工具。有时我遇到了同样的问题,调试诊断工具正在调试我的 w3p 进程。

于 2013-07-31T05:53:53.220 回答