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
Jeff_Lu
Posts: 384
Registered: ‎08-12-2008
My Device: 8700
Accepted Solution

where is my debug information?

Hi,

 

I have tried several ways to show debug information to console, however, there is nothing there.

 

How to write with IDE...

 

here is my code:

 

printf("%i",code);
	qDebug() << "my debug information";
	qWarning()<<"my warning information";

 

BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: where is my debug information?

I assume you mean Cascades.

I have used qDebug() << "stuff " << i;  from C++ and console.debug(value)  from qml.

These show up in debug builds in the console log in Momentics.

 

Stuart

Developer
Jeff_Lu
Posts: 384
Registered: ‎08-12-2008
My Device: 8700

Re: where is my debug information?

Thanks,

 

No lucky for me, both donot work.

 

is there any setting for debug information to show it?

 

 

BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: where is my debug information?

Are you building configuration Device-Debug or Simulator-Debug?

It just worked for me in the samples.

Try changing stampCollector to put a qDebug() << "Hello"; in setUpStampListModel and look in the window shown by Window/Show View/Console.   Perhaps it's where you are putting the qDebug().   Perhaps you are putting it too early.

I did not see the result of printf even if I added a \n terminator.

Try setting a breakpoint above the qDebug() and step until you have processed that line. Perhaps something afterwards has obscured the message.

 

Stuart

BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: where is my debug information?

fflush(stdout);

 

or fprintf(stderr, "....") instead which does not need flushing.

BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: where is my debug information?

Thanks for the fflush.

 

I found a way to misplace and find again my logs in Momentics.  If you are versant in Eclipse this is unlikely your issue, but just in case...

See attached picture in case this is the issue.

 

Stuart

Developer
Jeff_Lu
Posts: 384
Registered: ‎08-12-2008
My Device: 8700

Re: where is my debug information?

yes, you got the point..

 

Hide-and-seek game..