OpieDebugging

Opie has a built-in debug message system that makes it easy to output messages during execution. This system can be disabled and enabled at runtime.

Enabling debug output
In, add   to the   section, where   is a single digit. For some debugging modes, an additional  setting can be used to specify additional parameters. Available modes are as follows:

Example :

[General] debugMode=0

This will write debug messages to.

Note that if you edit  while Opie is running you will need to restart Opie so that the settings are re-read.

Adding messages to code
There are four streams you can send output to:,  ,  , and. These differ in the way they display messages, eg. will prefix messages with.


 * 1) include 

odebug << "No bugs here" << oendl; owarn << "This is your last warning!" << oendl; oerr << "Error detected." << oendl; ofatal << "You've just committed a fatal error!" << oendl;

See odebug.h for more info.

Note: The  stream is disabled if   is defined at compile time (which is controlled by the "Build Settings -> Enable debug builds" option in the Opie build configuration). The other streams are not affected by this.

This page was based on content from http://linuxtogo.org/gowiki/OpieWithAngstrom.