简体   繁体   中英

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

我无法在目标设备上使用仿真器,并且想调试正在运行的程序。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM