locked
VS2008 + .Net CF 3.5 + WinCE 6.0...Attach to process doesn't work RRS feed

  • Question

  • Hello,

    I have a target device with Windows CE 6.0 and an application developed on .Net CF 3.5 and Visual Studio 2008.

    I have executed the following procedure to use "Attach to process" feature :

    http://msdn.microsoft.com/en-us/library/b1ksfbk7.aspx

    but I always receive the following error :

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

    Why ?

    Thanks,

    Paolo.

    Tuesday, January 11, 2011 1:48 PM

Answers

  • you must set this registry flag.

     

    HKLM/Software/Microsoft/.NETCompactFramework/Managed Debugger/AttachEnabled (see http://blogs.msdn.com/b/davidklinems/archive/2005/05/24/421566.aspx )

     

    Also, if you haven't connected through activesync with visual studio, or used one of the remote tools (such as the registry editor).  You must manually copy two files to the device.  See my previous question, which I was able to answer. You only need to do this iff you get a .NET CF Initialization error after enabling the flag

     

    http://social.msdn.microsoft.com/Forums/en/vssmartdevicesvbcs/thread/5271dbc0-f4a0-422b-9ea3-3c4e9c99ace2

     

    This should work, if it doesn't work, my guess is that either your device is not persisting the registry or you are not flushing the registry changes.  Are you resetting the device?  Is the flag still set?  I would check with the remote registry editor (under visual studio remote tools).

     

    • Proposed as answer by Alan M_ Tuesday, January 11, 2011 3:31 PM
    • Marked as answer by Jesse Jiang Tuesday, January 18, 2011 7:32 AM
    Tuesday, January 11, 2011 3:31 PM

All replies

  • you must set this registry flag.

     

    HKLM/Software/Microsoft/.NETCompactFramework/Managed Debugger/AttachEnabled (see http://blogs.msdn.com/b/davidklinems/archive/2005/05/24/421566.aspx )

     

    Also, if you haven't connected through activesync with visual studio, or used one of the remote tools (such as the registry editor).  You must manually copy two files to the device.  See my previous question, which I was able to answer. You only need to do this iff you get a .NET CF Initialization error after enabling the flag

     

    http://social.msdn.microsoft.com/Forums/en/vssmartdevicesvbcs/thread/5271dbc0-f4a0-422b-9ea3-3c4e9c99ace2

     

    This should work, if it doesn't work, my guess is that either your device is not persisting the registry or you are not flushing the registry changes.  Are you resetting the device?  Is the flag still set?  I would check with the remote registry editor (under visual studio remote tools).

     

    • Proposed as answer by Alan M_ Tuesday, January 11, 2011 3:31 PM
    • Marked as answer by Jesse Jiang Tuesday, January 18, 2011 7:32 AM
    Tuesday, January 11, 2011 3:31 PM
  •  

    Hi Paolo,

     

    I'm very interested in hearing more about your issue, did you solve your problem?

    If so please share the solution with us and mark the right answers.

    If not please let me know and I will tray to help you find further solutions.

     

    Have a nice day!

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 14, 2011 6:04 AM