Share via


Application Debugging in XAML for Windows Embedded (Compact 2013)

10/26/2015

This topic describes a few of the basic options you can use to debug your application.

  • Use the debugging tools of Microsoft Visual Studio 2013 or Microsoft Visual Studio 2015. For example, you can set breakpoints in your source code in Visual Studio before running your application on a device or virtual CEPC that Visual Studio is connected to.

    Important

    If your application project is a subproject in an OS design project, then to use the debugging tools of Visual Studio, your application must not be included in the OS image. If the OS design project is configured to include your application in the OS image, then when you use Visual Studio to start your application, the OS will attempt to run the application contained in the OS image instead of the application in Visual Studio. For more information about configuring the OS design to support debugging, see Create Your Application as a Platform Builder Subproject.
    If you created a stand-alone application project using an SDK instead of creating a subproject in an OS design project, you don't have to worry about the OS design configuration because you just use Visual Studio to connect to your device or stand-alone virtual CEPC and press F5 to run your application.

  • Check the stack trace for the source of any errors.

  • Check the Windows Embedded Compact 2013 public source code for helpful comments.

  • Undefine the SHIP_BUILD preprocessor definition by using #undef (FMerge.exe) before you use #include (FMerge.exe) to include your header files, and then rebuild and rerun your project. If ERRORMSG is available, debug output appears that tells you the reason for a failure.

  • Use the kernel debugger to view information about your code, set breakpoints, step through code, control debug output messages, and perform just-in-time (JIT) debugging for both the run-time OS image and applications.

  • Use the post-mortem debugger to debug a device after it stops responding, by analyzing a dump file that the Windows Embedded Compact Error Reporting feature generates when there is a second-chance exception or when a particular event occurs.

  • Use one of the other tools provided with Windows Embedded Compact, which are described in Debugging and Diagnostics.

See Also

Concepts

XAML for Windows Embedded Application Development
Debugging

Other Resources

Debugging and Diagnostics