11
votes

I have a VS2010 running on a WTS machine (Windows2008). I'm trying to attach the debugger into a process. The process is running a WPF client. The process is presented in the attach to process dialog, but grayed out and the attach button is disabled.

I read through the discussions, and confirmed managed code is enabled for debugger, with no luck. Here are two screenshots representing the current situation (in the first image, the process I'm trying to debug is marked in blue - please note I'm running as admin):

snapshot goes here - but was removed by stack overflow...

After trying the automatic code type selection, I tried the manual way, with no luck. Here is the screenshot:

snapshot goes here - but was removed by stack overflow...

Any help would be appreciated.

Thanks, Busi

5
Are other processes greyed out as well, or only this specific process?lysergic-acid
I got this. It was working fine all morning an then decided to stop working after lunch. It is another example of the lower quality of software Microsoft has been putting out since Bill Gates took a less active role.Paul McCarthy
More info - working in VS 2008 and still not working in VS 2010. ...progress?Paul McCarthy

5 Answers

11
votes

Perhaps you are already attached to the process? Did start debugging before attaching to the process?

7
votes

Found another cause/solution to this problem, select the 'Show processes from all users' and 'Show processes in all sessions' check boxes and I got two instances of my service, one greyed out (which was always visible) and another I could attach to. hth :).

6
votes

I ran into the same issue with my windows service. I could not attach to a running windows service that I built. My solution has multiple projects with the windows service as the startup project.

I found out that my problem is caused by having the startup project is the same as the windows service.

To solve my problem, I just set a different project as the StartUp Project.

1
votes

I'm not certain, but there may be a debugger already attached to the process, and that's why Visual Studio won't let you attach it. Are you certain that you're not running the application already in debug mode or do you have another VS instance running?

0
votes

If you are trying to attach a web service or web app (w3wp.exe) then, try resetting the iis (iisreset). It worked for me.