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 Carrier: Mobifone

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!

 

 

Please use plain text.
Developer
StevenKader
Posts: 631
Registered: ‎02-03-2010
My Carrier: Rogers

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
Please use plain text.
Developer
thett
Posts: 63
Registered: ‎12-16-2011
My Carrier: Mobifone

Re: Debug in Momentics IDE

Yeah, I did. 

Please use plain text.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Carrier: Orange

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.
Please use plain text.
Developer
rcebryk
Posts: 84
Registered: ‎12-01-2012
My Carrier: Orange

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.
Please use plain text.