Partager via


Plug-in Connection Debugging (Windows Embedded CE 6.0)

1/6/2010

There are some issues that you may encounter during the development of a plug-in based on the Microsoft Remote Tools Framework. This topic provides information about how to debug issues specific to the connection between the desktop-side and device-side components of a plug-in.

Device-side Code Crash

If the device-side code crashes, you will lose your command transport.

In the Visual Studio Test Harness Event Viewer, check the Exceptions node to determine whether any exceptions are thrown. For more information, see the Visual Studio documentation.

Plug-in Fails to Load Concurrently

If you do not rename your assembly and reflect this change in the Bundle Input Editor, your plug-in may fail to load when other plug-ins are running concurrently.

For information, see Bundle Input Editor.

New Plug-in Overwrites Existing Plug-in

If you create a new plug-in from an existing plug-in but do not update the GUID, the newly created plug-in overwrites the previously built plug-in using that GUID.

This occurs because when you open a .cetool file, the components are unpacked to %Documents and Settings%\<user>\Application Data\Microsoft\Remote Tools Framework\Plugins.

In addition, the Visual Studio Core Connectivity component internally uses the GUID to differentiate one deployable component from another. Therefore, if you reuse the same GUID, Core Connectivity may fail to function as expected.

Plug-in Fails to Load

Make sure that the operating system on the target device satisfies the Sysgen dependencies in order for the plug-in to load. For more information, see Required OS Dependencies for Plug-ins.

Plug-in Fails to Connect to Target Device

Ensure that the .cetool file contains device-side executables for the target device, CPU, and operating system version to which you are trying to connect.

If you have the .cebundleinfo file from which the .cetool file was built, you can check the .cebundleinfo file for the executables. Otherwise, you can view the .cetool in a text editor.

Core Connectivity Verification

To determine whether the issue concerns Core Connectivity, run one of the Visual Studio remote tools, such as the Remote File Viewer. As these tools depend on Core Connectivity, this attempt facilitates narrowing down the issue if the tool cannot connect to the target device.

Possible methods of resolving Core Connectivity issues include the following.

  • Delete the Core Connectivity application data folder.

    Note

    If you delete this folder, you will have to recreate the device connection configurations in the Target Device Connectivity Options dialog box in Platform Builder. Make sure that you back up the contents of this directory before deleting the Core Connectivity application data folder.

    In Windows XP, the application data folder is typically located in:
    [C]:\Documents and Settings\<USERNAME>\Local Settings\Application Data\Microsoft\CoreCon\1.0.
    In Windows Vista, the application data folder is typically located in:
    [C]:\Users\<USERNAME>\AppData\Local\Microsoft\CoreCon\1.0.

  • In Control Panel, open Add or Remove Programs, and then perform a Repair on your Visual Studio installation.

  • Delete the Core Connectivity add-on XSL file for your plug-in.
    On your developer workstation, in the Core Connectivity add-ons folder, find the .XSL file with a file name that includes the name of your plug-in and its GUID. Delete the file for your plug-in so that the file will recreate the next time the plug-in loads.
    In Windows XP, the Core Connectivity add-ons folder is typically located in [C]:\Documents and Settings\All Users\Application Data\Microsoft\Corecon\1.0\Addons.
    In Windows Vista, the Core Connectivity add-ons folder is typically located at [C]:\ProgramData\Microsoft\Corecon\1.0\Addons.

Use Event Log to Search Error Messages

Turn on event logging to search for error messages. You can do this using the following method.

  • In the Remote Tools Framework Shell, on the Tools menu, click Options, and then click Log Remote Tools Framework events in Windows Event Viewer. Attempt to connect to the target device again, and then use the desktop event viewer to view the events. To do this in Windows XP, on the Start menu, click Control Panel, click Administrative Tools, and then click Event Viewer.

See Also

Other Resources

Debugging Plug-ins Based on the Remote Tools Framework