How to step debug into Qt core sources (and show sources)



  • Hi,

    I googled about this topic but I couldn't find a working solution for me, I'm probably doing something wrong.
    I build Qt 5.9.3 from sources with:

    PREFIX=~/local
    
    ./configure \
        -prefix $PREFIX \
        -debug \
        -opensource \
        -confirm-license \
        -ccache \
        -platform linux-clang
    
    make -j9 install
    

    Then I've configured Qt creator kit to use qmake in /home/myuser/local/bin/qmake but I'm not able to switch header/source into Qt core neither to step-debug into the implementation, I can see the headers though, and the header location is the expected one (under ~/local/include).
    Original source were built from /home/myuser/Qt/5.9.3/Src (same location of the build script I've pasted above).
    I'm on linux Xenial and Qt Creator 4.5.0
    Anything I could try?


  • Moderators

    @elpaso said in How to step debug into Qt core sources (and show sources):

    Anything I could try?

    Perhaps do an in-source build instead of specifying a separate prefix? Then potentially Qt Creator will be able to see the sources.

    I mean something like:

    cd 5.9.3/Src
    ./configure -prefix $PWD
    

    Or -prefix $PWD/qtbase, I'm not sure which will work. Well, I'm not sure if either will work, I've never tried to get all sources in Qt Creator.


  • Moderators

    @elpaso You can add the Qt sources in QtCreator settings in Debugger tab.



  • @jsulm thanks for the tip, I've tried that without success, but maybe I didn't get it right, this is what I set when click on "Add Qt sources ...":

    /Source path: /var/tmp/qt-src
    Target path: /home/myuser/Qt/5.9.3/Src
    

    I tried to get the path as seen by the debugger by enabling tooltips but I don't get any useful information.

    I've also tried to set the source path to PREFIXPATH without success:

    /Source path: /home/myuser/local
    Target path: /home/myuser/Qt/5.9.3/Src
    


  • @sierdzio thanks for the suggestion, I did not try that, but after a clean rebuild I'm now able to step-debug into core libraries, but still cannot switch header/source or click on a function and jump to the implementation.

    A small step forward though :)


Log in to reply
 

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