cja
cja

Reputation: 10016

How to debug a running .NET program on a Windows CE device

I could not get an emulator working for my target device and I wanted to debug a running program.

Upvotes: 2

Views: 2692

Answers (1)

cja
cja

Reputation: 10016

One-off setup

Connect the device to computer using ActiveSync. Basic connection is fine.

Do the following five steps the first time for each device (from http://msdn.microsoft.com/en-us/library/b1ksfbk7(VS.80).aspx)

  1. On the Windows Start menu, point to All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Remote Registry Editor.
  2. Using the Remote Registry Editor, connect to the device.
  3. Navigate to or create the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETCompactFramework\Managed Debugger
  4. Set or create a DWORD value named AttachEnabled.
  5. Set the data for the value at 1.

Also do the following the first time (from http://social.msdn.microsoft.com/Forums/en/vssmartdevicesvbcs/thread/5271dbc0-f4a0-422b-9ea3-3c4e9c99ace2)

Copy eDbgTL.dll and TcpConnectionA.dll from C:\Program Files (x86)\Common Files\microsoft shared\CoreCon\1.0\Target\wce400\armv4i\ to \Windows\ on the device.

To debug

  1. Start the program on the device.
  2. In Visual Studio, go to Debug > Attach To Process.
  3. Select Transport : Smart Device.
  4. Click Browse, select Windows CE Device, and click Connect.
  5. From the Available Processes list select the program and click Attach.

Upvotes: 2

Related Questions