Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
thett
Posts: 63
Registered: ‎12-16-2011
My Device: Red 10

Debug in Momentics IDE

Dear Devs,

 

How do I setup Momentics IDE to get app debug-able?

I already follow instructions but cannot have console to display anything although I  use qDebug().

 

btw, does it support a "watch" windows to watch runtime value?

 

Appreciate your help!

 

 

Developer
StevenKader
Posts: 645
Registered: ‎02-03-2010
My Device: Z10 LE

Re: Debug in Momentics IDE

Did you right click on project and select Built Configurations -> Set Active -> Device-Debug ?


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
thett
Posts: 63
Registered: ‎12-16-2011
My Device: Red 10

Re: Debug in Momentics IDE

Yeah, I did. 

Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790

Re: Debug in Momentics IDE

Add a following code to your main.cpp

void myMessageOutput(QtMsgType type, const char* msg){
fprintf(stdout, "%s\n", msg);
fflush(stdout);
}

int main(int argc, char **argv)
{
// this is where the server is started etc
Application app(argc, argv);
qInstallMsgHandler(myMessageOutput);
// localization support
QTranslator translator;
QString locale_string = QLocale().name();
Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Device: 9790

Re: Debug in Momentics IDE

It was mentioned somewhere in docs. You will receive QML console.log and Qt qDebug() messages in Console in both Debug and Release mode when running the app from IDE.
Lublin BlackBerry Developer Group


---
If I helped you please mark my response as solution or "Like" it.