Nominate our 2022 Qt Champions!

QT IDE and debug process Windows & Linux

  • Hello
    I have started to learn QT for few weeks.
    I have worked with Windows and Linux OS.
    At first glance I consider QT Creator IDE stupid comparing with other IDEs ( IntelliJIDEA, Eclipse, Visual Studio for example).
    The main my problem is debugging process: the QT IDE is not able to show values of complex variables, structures/class, strings
    (simple strings and wide char strings).
    I wanted to bulid source code with unicode strings to see clear the strings ( I added some simple chinese strings for example) but I did not succeded yet.
    I do not have very much experience with linux but in Visual Studio 8 I can do all this in few seconds.
    This are ordinary demand for any programmer regarding a clever IDE.
    I am sure it is posible but it is more, more complicated.
    Now I do not know exactly but I read something on net and I will continue to study.

    Can someone tell me how to show values of variabiles for debug ?

    How can compile code source with wide char strings ?

    It should be somewere detailed explanations about my troubles.

    Thanks in advance.
    Best regards.

  • Creator uses the debugger installed on your linux system and does not bring its own. We recommend using a gdb version >7.2 with enabled python support.

    That debugger does support display of complex types without any additional setup. Works-for-me(TM) ;-)

  • Hi Aliosa

    Set a break point in a logical place in you code,
    put you project in debug mode,
    Menu bar > debug > start debugging

    you can right click your variable, any variable and add it to watch,


  • Oh, you should also make sure to be using a debug build.

  • Yes Tobias I heard about that solution.

    But I have few questions.

    Shall I write python code for each class/complex structure/vector/tree
    etc. ?

    I do not know python.

    Is there another easier solution ?

    Can I solve this problem with Qt Eclipse Integration for Eclipse C++ ?

    Or with other smart IDE ?

    I remember you that all I want is to make fine debug in Windows/Linux for QT C++ project, to see clear all variabiles.

    Now, in Windows, with QT IDE (in debug process of course) , I can not see wide char strings properly (utf16 strings)- just numbers for each char.

  • You should see the Qt data types as well as the most important STL types, etc. in "pretty printing". You will get the normal debugger output for everything else.

Log in to reply