You know, the enterprise application running in work space is pushed down through the BDS server, and the Cascade IDE is not even up to debug.
And there's no way you can see the log of the enterprise app below the/accounts/1000/appdata/myappxxxxxx/logs.
Idea: in CASCADE/QT main program, redirect Qdebug output to console and/tmp/ddemo_console.txt file, then I can use IDE ssh to connect to the phone above, view this text file to look at the log.
Step 1) Edit main program code, output text to console and/tmp/ddemo_console.txt file
void Mymessageoutput (Qtmsgtype type, const char* msg) {
/* Print Debug message to IDE console *
/std::fprintf (stdout, "%s\n", msg);
Std::fflush (stdout);
QString text;
Switch (type)
{case
qtdebugmsg:
text = QString ("Debug:%1"). Arg (msg);
break;
Case QTWARNINGMSG:
text = QString ("Warning:%1"). Arg (msg);
break;
Case QTCRITICALMSG:
text = QString ("Critical:%1"). Arg (msg);
break;
Case QTFATALMSG:
text = QString ("Fatal:%1"). Arg (msg);
break;
}
/* Print Debug message to File/tmp/ddemo_console.txt *
/QFile file ("/tmp/ddemo_console.txt");
File.Open (Qiodevice::writeonly | Qiodevice::append);
Qtextstream ts (&file);
ts<<text<<endl;
File.close ();
Std::fflush (stdout);
}
Step 2) redirect the Qdebug () output in the main () method of the program
Qinstallmsghandler (Mymessageoutput);
Step 3) In the application, output debugging information with Qdebug, such as
#include <QDebug>
Qdebug () << "Trying to start the demo.";
Step 4) Compile the signature application, upload it to the BDS server, and push the installation application onto the phone from the server.
Step 5) Enable developer mode on your phone, connect to your phone with IDE ssh on your PC and view the/tmp/ddemo_console.txt file.
Tail-f/tmp/ddemo_console.txt
----------------------------------------------
Reference: https://developer.blackberry.com/cascades/download/releasenotes/