Partager via


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

Send Feedback

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.

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
    
  2. On the target device, create a file named STORE.lnk with the following contents:

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

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

  5. 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.

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

  7. 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.

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

  9. 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

Readlog Viewing Tool | OSCapture Command-Line Overrides

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.