[This entry is a refinement of an article I found here ] Testing applications for mobiles or embedded systems is very hard most of the time because I'm not always able to debug the application on the device. One solution was to write some debugging lines inside the program, and when the program passes each of these lines, the line will be written to a text file. Then I can simply open the text file and see how the application went or where it stopped. Here it how it goes: - Before the main(), I write: using namespace std; ofstream logfile; void SimpleLoggingHandler(QtMsgType type, const char *msg) { switch (type) { case QtDebugMsg: logfile << QTime::currentTime().toString().toAscii().data() << " Debug: " << msg << "\n"; break; case QtCriticalMsg: logfile << QTime::currentTime().toString().toAscii().data() << " Critical: " << msg << "\n...
Sharing my experience from trials and troubles.