Just-In-Time Kernel Debugging (Compact 7)
3/12/2014
Windows Embedded Compact 7 supports Just-In-Time (JIT) debugging, which is the ability to debug crashed code at the moment the OS would typically terminate the relevant process. This feature is useful when you are faced with a halted OS on a stand-alone Windows Embedded Compact powered device.
If you set up the OS for JIT debugging beforehand, you can respond to the system crash by connecting the device to a development computer that is running Platform Builder and then debugging the kernel or the running application.
When an exception occurs, the sequence of events is as follows:
- When the OS encounters an exception, it immediately checks to see if there is a kernel independent transport layer (KITL) connection to a development computer that is running Platform Builder.
- If a connection exists, the kernel debugger receives the exception.
- If no connection exists, this first-chance exception is passed back to the application that generated it. The application's exception handler is given a chance to handle this exception.
- If the application does not handle the exception, a second-chance exception passes to the kernel debugger. This is the point at which JIT debugging can take effect. After the kernel debugger receives the second-chance exception, it checks again for a KITL connection between the Windows Embedded Compact powered device and the development computer.
- If a connection now exists, the kernel debugger takes the exception.
- If there is still no connection, the debugger waits for a KITL connection to be made. At this point, you can set up a KITL connection between the device and the development computer; after this connection is made, the device can be debugged.
In this JIT debugging scenario, the OS of the Windows Embedded Compact powered device freezes and waits for a KITL connection to be made. No message is sent to signify this freeze to the user; in some situations, there might not be a user interface.
For information about how to set up JIT debugging, see Set Up JIT Debugging.