다음을 통해 공유


Collecting Debug Messages in a Limited Buffer with OSCapture (Windows Embedded CE 6.0)

1/5/2010

You can use the event-tracking library, CeLog.dll, and OSCapture.exe to store debug output in a limited-size memory buffer on a target device. The messages will not be written to a file until you command OSCapture to do so. When you do, only the most recent messages will be saved.

The following instructions use a shortcut file for maximum convenience. You can also use other techniques to set up the same behavior: be sure to enable the CELZONE_DEBUG zone, to trigger OSCapture to save the data to a file, and to view the data using the Readlog tool.

To collect debug output messages with OSCapture.exe

  1. On the target device, create a file named LOAD.lnk with the following contents:

    90#\Windows\oscapture.exe -buf 0x100000 -time 10000 –save 6 -n \celog.clg -z 0x00800000 -ui 1
    

For more information about creating a .lnk shortcut, see Creating a Shortcut File.

  1. On the target device, create a file named STORE.lnk with the following contents:

    31#\Windows\oscapture.exe -c -ui 1
    
  2. Copy CeLog.dll and OSCapture.exe into the \Windows directory of the target device.

  3. Copy the .lnk files you created in step 1 and step 2 into the same directory as the Start menu on the target device.

  4. From the Start menu, choose LOAD.lnk.

    This step configures the log file settings, and causes OSCapture.exe begin buffering debug output in a limited-size RAM buffer. It will buffer approximately 60 seconds of debug messages, or 1MB, whichever is smaller. If the messages overfill the buffer, it will keep the most recent data.

  5. Perform the actions you want to collect output for.

  6. From the Start menu, choose STORE.lnk.

    OSCapture.exe saves the buffered debug messages to a file named celog.clg in the root directory of the device.

    You can repeat steps 6 and 7 as often as needed to add the data you want to the output text file. The instance of OSCapture that you started in step 5 continues to buffer data in the background after you run step 7 to trigger it to flush data to a file.

  7. When you are done collecting data, copy celog.clg to a storage location off the device.

  8. To read the saved output, use the Readlog Viewing Tool.

    The following line shows how use Readlog to parse a log file called celog.clg and store readable text into a file called output.txt.

    Readlog celog.clg output.txt
    

See Also

Reference

OSCapture Command-Line Overrides

Other Resources

OSCapture.exe
Readlog Viewing Tool