简体   繁体   English

如何在Windows CE设备上调试正在运行的.NET程序

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

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

One-off setup 一次性设置

Connect the device to computer using ActiveSync. 使用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 ) 第一次为每个设备执行以下五个步骤(来自http://msdn.microsoft.com/zh-cn/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. 在Windows“开始”菜单上,指向“所有程序”,再指向“ Microsoft Visual Studio 2005”,再指向“ Visual Studio工具”,然后单击“远程注册表编辑器”。
  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 导航到或创建以下项:HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft.NETCompactFramework \\ Managed Debugger
  4. Set or create a DWORD value named AttachEnabled. 设置或创建一个名为AttachEnabled的DWORD值。
  5. Set the data for the value at 1. 将值的数据设置为1。

Also do the following the first time (from http://social.msdn.microsoft.com/Forums/en/vssmartdevicesvbcs/thread/5271dbc0-f4a0-422b-9ea3-3c4e9c99ace2 ) 还要第一次执行以下操作(来自http://social.msdn.microsoft.com/Forums/zh-CN/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. 将eDbgTL.dll和TcpConnectionA.dll从C:\\ Program Files(x86)\\ Common Files \\ microsoft shared \\ CoreCon \\ 1.0 \\ Target \\ wce400 \\ armv4i \\复制到设备上的\\ Windows \\。

To debug 调试

  1. Start the program on the device. 在设备上启动程序。
  2. In Visual Studio, go to Debug > Attach To Process. 在Visual Studio中,转到“调试”>“附加到进程”。
  3. Select Transport : Smart Device. 选择传输:智能设备。
  4. Click Browse, select Windows CE Device, and click Connect. 单击浏览,选择Windows CE设备,然后单击连接。
  5. From the Available Processes list select the program and click Attach. 从“可用进程”列表中选择程序,然后单击“附加”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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