I use this
//#define DEBUG_ON
#ifdef DEBUG_ON
#define DEBUG(x) DebugStringToFile("DebugFile",x);
#else
#define DEBUG(x)
#endif
#ifdef DEBUG_ON
#define DEBUGNUM(x) {Char dispStr[10];
StrIToA(dispStr,x);DebugStringToFile("DebugFile",dispStr);}
#else
#define DEBUGNUM(x)
#endif
with this
void DebugStringToFile (Char* fileNameP,Char* messageP)
{
FileHand fileH;
Err error;
fileH= FileOpen (0,fileNameP,0,'DBUG',fileModeAppend,&error);
FileWrite (fileH,messageP,StrLen(messageP),1,&error);
FileClose(fileH);
}
turn the Define on and off to enable/disable, then throw in
DEBUG("Message\n");
or
DEBUGNUM(number);
wherever you need it.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/