Debugging Windows CE.Net with remote debug tools in VS 2003

This article assumes that the developer knows how to debug applications using the standard processes such as activesync.  This particular process is for users that do not require activesync to be on their device or prefer to use a more robust method of debugging.

 

Tools required:

Visual Studio 2003

Windows CE

Install PowerToys from MS website

SDAuthDevice.exe for your processor type from PowerToys

Ethernet cable (straight through or crossover, dependant on your product)

 

  • Start Visual Studio 2003 and open your project that you want to debug on the device.
  • Start Windows CE.Net ensuring that you place SDAuthDevice on the Windows CE device on the CE device turn on the device and plug the Ethernet cable into both the device and the PC.

 

The next thing you need to do is set up the CE device and the pc so that they can communicate with each other.  In order to do this you need to double click the SDAuthDevice.exe file on the device which should come up with a list of IP addresses that the device is set to for each Ethernet port that the device has.  This is the IP address that you will link to from your pc e.g. 192.135.1.1 and click start.  Then put your IP address on your PC to the same range as the device i.e. 192.135.1.130.  Go into Visual Studio on your PC and run the Smart Device Authentication Utility from the Tools menu bar.  Put the IP address in as the same as the device that you are connecting to i.e. 192.135.1.1.  Once it has said that it has connected close the application and go to the Device Options in Visual Studio, select the Windows CE.Net device and select Transport as TCP Connect Transport and click on the Configure button.  This will give you a form with a list of configuration settings.  Ensure that the IP address is set to your device IP Address, NOT obtain IP address automatically using ActiveSync and if you have closed off most ports on your device select a port that you know is going to allow connections.

 

You are now ready to start debugging your programs on the CE platform.  To do this you need to ensure that when you run the application you deploy the application to the Windows CE.Net Device not the emulator. This will send the CAB files to the device, deploy the CAB files and install your software and allow you to remotely debug your code.  

 

If you are running on a bespoke device be aware that you may have to re-set your registry settings to get your own third party softwares to run again.  We have had this issue in our office and we have a registry cab file with our original registry settings and re-set them to this!  You can use the Embedded C++ tools to capture the registry values from your device and export them into a file... You need to put them into a CAB file to then re-install these settings onto your device.  Best of luck!

posted @ Sunday, June 05, 2005 6:50 PM

Print

Comments on this entry:

# re: Debugging Windows CE.Net with remote debug tools in VS 2003

Left by Charles Piché at 7/13/2005 4:52 PM
Gravatar
Thank you very much for this post. This is exactly what I needed and couldnt find anywhere in the Microsoft documentation.

# re: Debugging Windows CE.Net with remote debug tools in VS 2003

Left by Sarah at 7/14/2005 5:35 AM
Gravatar
I'm glad that you have found it useful. I decided to write down everything I have to go through every time I want to remotely debug my CE apps, and I only know because someone else taught me how to do it. I thought it would be a good idea to share the secrets with the world.

# re: Debugging Windows CE.Net with remote debug tools in VS 2003

Left by graham at 9/16/2005 3:22 AM
Gravatar
where abouts is the SDAuthDevice.exe ??

I've downloaded PowerTools, but I can't seem to find what to do next..

good job on the doc though, the ms site is awful.

-Graham

# re: Debugging Windows CE.Net with remote debug tools in VS 2003

Left by Sarah Blow at 9/16/2005 8:48 AM
Gravatar
The item that you are looking for is usually found on the device either under windows or Program Files as a hidden file. If it is already there you do not need to copy it from your pc onto the device.

If you need to copy it you can find a copy of the file under:
[Your Windows hard drive]:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities\Authentication Util\WinCE4\

Select your processor type and then copy the SDAuthDevice.exe onto your device.

On your pc in Visual Studio you will find under the tools menu an item called smart device authentication utility. Click on this once you have the other bit running.

Good Luck

Your comment:



 (will not be displayed)


 
 
 
Please add 3 and 3 and type the answer here:
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456