Problems about remote debugging embedded linux with qt creator.



  • Hi,
    I am debugging a C program on embedded linux platform, now I can debug the program in creator with a gdbserver running on the board. because the openssh has been transplanted successfully , I can use any functions proviced by Qt creator , add break point, step over ,step in and any other operations provided by Qt creator.
    But here is a problem: the Application output panel in the Qt creator can not display the Application output . for example, my program is like this:

        int main()
        {
                  printf("hello,qt");
        }
    

    when my program executed to the printf function , Application output panel should display "hello, qt", but the result it that it displays nothing. (I have add the CONFIG += console in my .pro file).

    so , I want to know : is there anything wrong with my configuration for Qt creator or my debugger, or it is a bug of qt creator , if not , how can I configure my qt creator or debugger to make my Application output panel display the application output . can someone help me with this problem?

    best regards.
    Liurong



  • Use this instead to see in your Qt console output:

    qDebug() << "Hello, Qt";



  • @justin1122
    Thanks for your help !
    I have tried this, it's a good solution, but it works only in a C++ program.
    since the project that I created is a plain C project , so I can not include the header file "qdebug.h", in this situation, how can I do this, is there any funtions for plain C language has the same effect?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.