Debugging eVC++ 4.0 Application using Visual Studio 2005

 

 

Hi, I am Gaurav Sisodia, working in Debugger team of Visual Studio for Devices. In my blog, most of the posts will help in making the debugging experience easier for Developer Community.

Why read this Post?

This post will give an easy way of using Visual Studio 2005 to debug applications developed in eVC++ 4.0 without migrating those.

Who is this meant for?

The reason behind writing this post is to help those developers who are still using WinCE 4.2 on ARMV4 boards and don’t want to migrate applications written in eVC++ 4.0 right now but want to adopt rich debugger features of Visual studio 2005 to debug applications.  I am assuming that reader is pretty good at using eVC++ 4.0

 

What are the high level steps and why to do each?

  1. Create a Debug Build of eVC++ Application: We need symbols for debugging so you need to create a debug build
  2. Create Smart Device Visual C++ STANDARDSDK_500 Console Application (Dummy Project) using VS-2005: In Visual Studio projects are being created keeping in mind the target. Here project targeting WinCE device is required because we want to debug an application on WinCE 4.2
  3. Connect WinCE 4.2 ARM board and development machine: For deploying and launching the application through VS2005
  4. Modify Properties of Dummy Project created using VS-2005 such that on pressing F5 it deploys, launches and debug the application which is created using eVC++: This workaround is needed because VS2005 doesn’t support opening a smart device executable and start debugging.
  5. Specify symbol path and start debugging by pressing F5/F10/F11: Symbol path is required to pick up the symbols from PDB corresponding to exe produced by eVC++

What are the sub steps in each high level step? Helpful for new user.

  1. Create a Debug Build of eVC++ Application

· Build eVC++ 4.0 application selecting target architecture as “Win32 (WCE ARMV4) Debug”.

 

  1. Create Smart Device Visual C++ STANDARDSDK_500 Console Application (Dummy Project) using VS-2005

· On the File menu select New and then Project

· In New Project Wizard please expand Visual C++ and select Smart Device on left hand pane. It will populate the list of installed Smart Device templates on the right hand pane of this wizard.

· Select Win32 Smart Device Project on right hand pane and give Dummy as project name in Name: text box and finally click OK.

· In Win32 Smart Device Project Wizard either click Platform on left hand pane or click Next button.

· Remove everything from Selected SDKs list and move STANDARDSDK_ 500 from Installed SDKs to Selected SDKs. Now either click Application Settings or click Next button

Note: If you don’t find STANDARDSDK_500 then please install it from https://www.microsoft.com/downloads/details.aspx?FamilyID=FA1A3D66-3F61-4DDC-9510-AE450E2318C3&displaylang=en

· Select Console Application and click Finish button

 

  1. Connect WinCE 4.2 ARM board and development machine

· For connecting your ARMV4 board to development machine please follow the steps mentioned in the following link

https://msdn2.microsoft.com/en-us/library/ms228708.aspx

  1. Modify Properties of Dummy Project created using VS-2005 such that on pressing F5 it deploys, launches and debug the application which is created using eVC++:

· Go to Solution Explorer and right click Dummy and select Properties

· Expand Configuration Properties and select Deployment on the Left Hand Pane.

· Go to the Right Hand Pane and select text box corresponding to Additional Files. The syntax for this text box is <filename>|<source directory>|<remote directory>|<register>. Here is the explanation for each

§ <filename>: Binary name produced from eVC++ 4.0

§ <source directory>: Full Path where above binary is stored

§ <remote directory>: Full Path where you want to deploy the executable. For example: \Program Files\Dummy\

§ <register>: Set it to 1 if you are required to register the binary

· Select Debugging on the Left Hand Pane

· Go to Right Hand Pane and select text box corresponding to Remote Executable. The syntax for this text box is <remote directory>\<eVC++ executable>. Here is the explanation for each

§ <remote directory>: Full path where eVC++ executable is deployed. For example \Program Files\Dummy\

§ <eVC++ executable>: Name of the executable to be debugged

· Finally click OK

  1. Specify symbol path and start debugging by pressing F5/F10/F11

· On the Tools menu select Options

· Expand Debugging and then select Symbols on the Left Hand Pane

· On the Right Hand Pane there is a box corresponding to Symbol file (.pdb) locations. Click the folder icon above that box and editable text will appear in the box

· Edit the text to add a new pathname where PDBs corresponding to binary (developed in eVC++ 4.0) to be debugged is stored.

· Click OK

· Press F5/F10/F11 and happy debugging

 

What you can’t Debug?

You can’t use VS2005 to debug applications developed on eVC++ 4.0 targeting WinCE 4.2 (X86 devices). The reason is Visual Studio 2005 doesn’t support connectivity with X86 devices having WinCE 4.2 because X86 binaries don't run on CE 4.2 due to a compiler/linker dependency change in CE 5.0 

Thanks

Gaurav

Comments