Partager via


Attaching the Managed Debugger to a Running NetCF v2 Application using Visual Studio 2005

Earlier in the week, I posted information about how to enable Attach to Process  for your applications running on version 2 of the .NET Compact Framework.  Today, I'd like to talk a little about how to use Visual Studio 2005 to attach to your managed applications.

Note: This post uses the Beta 2 release of both the .NET Compact Framework and Visual Studio 2005.

To attach to your .NET Compact Framework application, you will need to be sure to have the communications transports deployed to your device.  The easiest way to get the required files deployed is to use Visual Studio to build and debug at least one application on your device.

Attaching to a managed application

  1. Build and deploy your application to your device
    • On the Build menu, select Deploy Solution
       This will ensure that your executable, symbols and source files will all match
  2. Close the solution
  3. Enable Attach to Process support on the device
  4. Start your application
  5. Attach to the process
    • On the Tools menu, select Attach to Process
    • In the Transport list, select Smart Device
    • In the Qualifier list, select your target device
      • If your target device is not listed, click the Browse button and select from the Connect to Device dialog
    • In the Available Processes, select your application (executable name and window title are listed)
    • Click the Attach button
  6. Once attached, break into your application
    • On the Debug menu, select Break All

You can now debug your application.

Please be sure to disable Attach to Proccess support once you are finished debugging to avoid the performance issues discussed in the enabling attach to process post.

Enjoy!
-- DK

Disclaimer(s):
This posting is provided "AS IS" with no warranties, and confers no rights.
Some of the information contained within this post may be in relation to beta software. Any and all details are subject to change.

Comments

  • Anonymous
    March 15, 2006
    During my recent MEDC session, I demonstrated how to debug both the managed and native code sides of...