Debugging a Debugger Extension DLL (Windows Embedded CE 6.0)

1/5/2010

This topic describes how to start debugging a debugger extension DLL that is loaded in Platform Builder by running the debugger in a separate instance of Microsoft Visual Studio 2005. This enables you to use one instance of Visual Studio 2005 to debug another instance of Platform Builder for CE 6.0 that has the debugger extension loaded.

To start debugging a debugger extension DLL, you must have completed steps 1 through 7 in How to Create and Debug a Debugger Extension and current have an active connection to the target device from Platform Builder that also has hello_ext.dll loaded.

  1. Open another instance of Microsoft Visual Studio 2005.

  2. On the Debug menu, choose Attach to Process.

  3. Choose the Select button that is next to the Attach to box.

  4. Choose Debug these code types, select Native, and then choose OK.

  5. In Available Processes, choose devenv.exe, and then choose Attach.

    Once the symbols loaded debug output is displayed in the output window as shown in the following text, you can set a breakpoint.

    'devenv.exe': Loaded 'C:\Users\MyAccount\Documents\Visual Studio 2005\Projects\hello_ext\debug\hello_ext.dll', Symbols loaded.
    
  6. Set a breakpoint. In this example, set a breakpoint in the Hello command that you created in How to Create and Debug a Debugger Extension.

    1. On the Debug menu, choose New Breakpoint, and then choose Break at Function.
    2. In the Function box, type "Hello", Set Language to C++, and then choose OK.
    3. To verify your breakpoint, on the Debug menu, choose Windows, and then choose Breakpoints.
  7. Switch to the instance of Visual Studio 2005 that is attached to the target device. Hello_ext should be already loaded from the previous steps in How to Create and Debug a Debugger Extension.

  8. At the command line, type !Hello to run the Hello command. The Visual Studio debugger should immediately cause Platform Builder to pause execution at the Hello command in your debugger extension.

Community Additions

ADD
Show: