Missing Console Output in "Application Output" Tab in Qt Creator

1,507 views
Skip to first unread message

Josiah Bryan

unread,
Aug 3, 2012, 9:34:27 AM8/3/12
to andro...@googlegroups.com
This occurs on every install of Necessitas I've done this week (that would be one Win 7, and three on three different Cent OS 6.3 machines) - and it's been this way for the past several months - that is, absolutely no output from my app ever appears in the "Application Output" tab of Qt Creator. Only "Starting remote process ..." (in blue), and then when the app closes, "'org.blah.blah.blah' died" (in red). (And yes, this problem occurs regardless of if I build in Debug or Release mode, or if I build arm 5 or arm 7a, etc. And yes, I see all sorts of output on the console from my app when I build and run it on the linux machine itself, outside of Necessitas.)

I've worked around this (sort of) by adding a custom message handler via qInstallMsgHandler that intercepts qDebug() output and sends it via a TCP socket to a netcat listner on the network, e.g. nc -l -k 3729. (See http://code.google.com/p/wifisigmap/source/browse/trunk/MapWindow.cpp#19 - yes, the code is rather hackish - it's not meant to be a sterling example of how to code, rather, just a hack to get at the qDebug() message.)

However, this custom message handler doesn't get (or, rather, my netcat listner doesn't get) messages that occur right on app init, nor does it get messages that occur right before a crash - which would be useful to figure out where the app crashed since the debugger isn't working (see my other thread on that issue.)

So, with the debugger not working, is there a way to get the qDebug() output directly in the "Application Output" tab of Qt Creator? (I vaguely recall this working late last year/earlier this year - but it hasn't worked at all since I started using Necessitas again this summer.)

Thanks for your help!
-Josiah

Nalin Savara

unread,
Aug 3, 2012, 9:42:13 AM8/3/12
to andro...@googlegroups.com
If seeing app output without netcat is the goal;do:
adb connect localhost:5554

 adb logcat

-Nal

Nalin Savara

unread,
Aug 3, 2012, 9:44:58 AM8/3/12
to andro...@googlegroups.com
One QUestion:
Is there a reason you are using netcat and not adb ???

-N

Josiah Bryan

unread,
Aug 3, 2012, 9:45:40 AM8/3/12
to andro...@googlegroups.com
On Fri, Aug 3, 2012 at 9:44 AM, Nalin Savara <nsn...@gmail.com> wrote:
One QUestion:
Is there a reason you are using netcat and not adb ???


Ummmm....how would I use adb to see the console output of my app that I run in Qt Creator?

Nalin Savara

unread,
Aug 3, 2012, 9:46:59 AM8/3/12
to andro...@googlegroups.com
are you saying it's a qt desktop app; and not a android-qt necessitas app ?

-N

Josiah Bryan

unread,
Aug 3, 2012, 9:53:13 AM8/3/12
to andro...@googlegroups.com
On Fri, Aug 3, 2012 at 9:46 AM, Nalin Savara <nsn...@gmail.com> wrote:
are you saying it's a qt desktop app; and not a android-qt necessitas app ?


Sorry for the confusion. 

This is an Android-Qt Necessitas app. I'm building it in Necessitas' Qt Creator. I click Run - it installs the app on my device (phone), runs, the app executes, appears on the device's screen, I interact with it - and when I exit the app on my phone, the Qt Creator on my laptop says the app died - perfect. The problem is, Qt Creator on my desktop never gives me the *console output* of my app that's running on my phone. (It used to - older versions of Necessitas - but not anymore.)

- I tried "adb connect localhost:5544" but it says unable to connect to localhost:5544:5544"
- Running "adb logcat" while my app is running does *not* show any console output (e.g. qDebug() statements, etc.) from my app - it just shows other unrelated system activity. I even piped logcat thru grep on my machine to check for key strings from my app - nothing appears.

Nalin Savara

unread,
Aug 4, 2012, 12:39:09 AM8/4/12
to andro...@googlegroups.com
if debugging on device... See the adb help for exact command...
Localhost is when you're debugging on emulator on local machine.

Listing debug log even frm device is a pretty standard use-case...

Regards,

Nalin

Josiah Bryan

unread,
Aug 4, 2012, 12:42:14 AM8/4/12
to andro...@googlegroups.com
On Sat, Aug 4, 2012 at 12:39 AM, Nalin Savara <nsn...@gmail.com> wrote:
if debugging on device... See the adb help for exact command...
 Localhost is when you're debugging on emulator on local machine.
 
I'm sorry, I can't parse what you said there - I'm not sure what you mean "if debugging on device"....

Listing debug log even frm device is a pretty standard use-case...

I'm a bit dense, sorry - yes it's a standard use case - but it's not working. How can I see the console output from my app that's running on my device?

 <snip>
Reply all
Reply to author
Forward
0 new messages