Capturing Event Tracking Data with OSCapture (Windows Embedded CE 6.0)
1/5/2010
To record events, run OSCapture.exe in the background while you use the target device. When an event occurs that you want to examine closely, trigger OSCapture to flush its buffered data from RAM into a log file.
You can trigger OSCapture to save data to a file in two ways:
- Run a second instance of OSCapture with the
-c
command-line parameter - Call SetEvent to set an event named SYSTEM/OSCaptureTrigger. This call triggers data capture programmatically when a problem condition is detected.
The way OSCapture manages its limited buffer is especially useful when a target device has only a limited amount of data storage space, such as when the device runs standalone without a connection to a development workstation. OSCapture is especially useful for diagnosing performance problems, or for diagnosing a problem that occurs episodically.
For example, to diagnose a performance issue, trigger OSCapture manually when you notice an unusual reduction in the performance of the target device.
To record the events that lead up to a problem condition in your code, trigger OSCapture programmatically by setting the event to trigger when your code detects the problem condition. You can use this method to record a limited buffer of thread activity or debug output from immediately before the problem, to help you determine what conditions led to the error.
Note
While OSCapture.exe runs, you may notice a reduction in the performance of the target device. For this reason, Microsoft recommends that you add OSCapture.exe to the run-time image only during investigation of a known problem with the target device, and that you minimize the number of CeLog zones that are set.
You can trigger OSCapture as many times as you like. If you capture to a file more than once, the most recent data is appended to the existing contents of the log file.
See Also
Tasks
Collecting Data On A Standalone Device With OSCapture
Storing Data from OSCapture in a Log File