[Solved] How to properly setup Source Paths Mapping in QtCreator for Qt 5.0.1

  • Hi,

    I just downloaded and installed Qt 5.0.1 for Windows 32-bit (MinGW 4.7). If I build a debug version of an example in QtCreator 2.6.2 (i.e. cube example) I can debug the example code but I cannot step into the Qt sources (i.e. widget.show()). I guess that I need to setup Source Path Mappings in QtCreator but I don't know what to enter for source and target path.

    I installed Qt 5.0.1 to C:\Coding\Qt5.0.1. That means the root directory of the installation that contains InstallationLog.txt is C:\Coding\Qt5.0.1. If I press the QtCreator button Add Qt sources... it adds the source paths C:\iwmake\build_mingw_opensource and C:\ndk_buildrepos\qt-desktop\src. But I'm not sure wich target paths to enter here. I tried C:\Coding\Qt5.0.1\5.0.1 and C:\Coding\Qt5.0.1\5.0.1\Src - but none of them worked and I still can't step into Qt functions.

    Any idea how to properly setup source paths mappings to debug Qt 5.0.1 source code.

  • When u installed qt from installer did u enabled the source checkmark to tell installer to install cpp files?

  • Yes, I did. The complete source code is properly installed under C:\Coding\Qt5.0.1\5.0.1\Src.

  • I just checked the poblem with a clean installation of Qt 5.0.1 for Windows 32-bit (MinGW 4.7) into a clean virtual Windows 7 machine. I installed all components including source code. Then I started a debug session of blurpicker example. I could not step into Qt functions and all Qt source files in debugger source files views are greyed.

    So it is not possible to step into Qt library when debugging Qt 5 aplications.

  • I created a bug report and got the confirmation that this is a bug - here is the proposed solution:

    bq. Unfortunately the paths in the debuginfo packages aren't patched properly, as described in "QTBUG-29449":https://bugreports.qt-project.org/browse/QTBUG-29449. Workaround is to add a mapping manually: Go to Options -> Debugger, Add "q:\qt5_workdir\w\s\qtbase" -> "C:\Qt\Qt5.0.1\5.0.1\Src\qtbase" to Source Paths mapping section.

Log in to reply

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