Attach to process not working


Scott Gifford


I'm trying to figure out a problem in my app that happens only after a
few days of normal use. I'd like to be able to run it normally for
awhile, then when the problem happens attach it to the debugger to see
what's going on. I should be able to do this with "Attach to
Process", but I can't get it to work.

First, I have set this registry key to 1 on the device:


according to these instructions:

Then I start up my app on the device. After a short while I attempt
to attach to the process by selecting Debug/Attach to Process from the
menu, using transport "Smart Device" and the appropriate qualifier. I
see the list of processes, find my process, and press "Attach".

Nine times out of ten, I get this error:

Unable to attach to the process. A socket operation was attempted
to an unreachable network.

Any idea what would cause this error, or what to do about it?

I'm using Visual Studio 2008. My app is using .NET 2.0, and my device
is running Windows Mobile 6.0 Standard.

I compile my app as a WM 5 app, so it can run on either platform.
When I'm picking the device to attach to a process on, does it matter
if I select "Windows Mobile 6.0 Standard" (which the device actually
is) or "Windows Mobile 5.0 SmartPhone" (which the application is
targeted for)?

Thanks for any ideas!



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question