Attached the debugger to a running .NET Compact Framework process

0.00 avg. rating (0% score) - 0 votes

To attach the debugger to a running process on the device:

  • On the Debug menu, click Attach to Process.
  • In the Transport box, select Smart Device.
  • To populate the Qualifier box, click Browse.
  • In the Connect to Device dialog box, select the correct device type, and then click Connect.
  • To populate the Attach to box, click Select.
  • In the Available Processes box, select the process name, and then click Attach.
  • You are now attached with the native debugger.

By default, devices, including emulators, do not allow the managed debugger to attach to processes that are already running. Attaching the managed debugger to an already running process is a situation that you typically encounter in device solutions that include both managed and native code.

To enable the managed debugger to attach to a running process:

  • Open the Registry Editor for the target device, expand Windows Mobile 5.0 Pocket PC Emulator, and then create the following key:
  • HKEY_LOCAL_MACHINESOFTWAREMicrosoft.NETCompactFrameworkManaged Debugger.
  • Create a DWORD named AttachEnabled.
  • Set the Name as AttachEnabled, and the Value as 1.
  • You may need to restart Visual Studio, or at least close the running application on the device which you want to attach to.

Without this registry modification, there will be an error:

“Unable to attach to the process. Attach is not enabled for this process with this debug type.”


0.00 avg. rating (0% score) - 0 votes


A tough developer who likes to work on just about anything, from software development to electronics, and share his knowledge with the rest of the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>