Qt Creator: View (and debug into) Qt Sources?
-
Qt Creator 2.2 final is already released, see:
http://labs.qt.nokia.com/2011/05/06/qt-creator-2-2-released/
-
I was having problems despite seeing the feature for the source. I am adding this in hopes that it will save others some time. I am using the QtSDK with QtCreator 2.4.1, and I have downloaded the source using the QtSDK package manger. The source is located in the default path (relative to the SDK root) C:\QtSDK\QtSources\4.8.0.
In the QtCreator options, under Debugger->General you need to click on "Add Qt sources...". Then you need to select C:\QtSDK\QtSources\4.8.0. I was originally making the mistake of selecting C:\QtSDK\QtSources\4.8.0\src - which obviously was failing.
Once you OK out of the dialog you should be able to debug into the Qt source code in QtCreator.
-
[quote author="bmanc" date="1333571328"]I was having problems despite seeing the feature for the source. I am adding this in hopes that it will save others some time. I am using the QtSDK with QtCreator 2.4.1, and I have downloaded the source using the QtSDK package manger. The source is located in the default path (relative to the SDK root) C:\QtSDK\QtSources\4.8.0.
In the QtCreator options, under Debugger->General you need to click on "Add Qt sources...". Then you need to select C:\QtSDK\QtSources\4.8.0. I was originally making the mistake of selecting C:\QtSDK\QtSources\4.8.0\src - which obviously was failing.
Once you OK out of the dialog you should be able to debug into the Qt source code in QtCreator.
[/quote]Thank you for your solution. :)
-
Has anyone tried this with a newer version of Qt and Qt Creator?
I'm currently trying to use Qt Creator 3.6.1 to debug Qt 5.6.0 for Android (on Windows). The kits were auto generated, once I found a compatible NDK (i.e. android-ndk-r10e-windows-x86), and I am able to debug QML and the C++ in the Qt example app. However I cannot debug the Qt Source, even though I followed the steps mentioned above:
- I made sure I downloaded the Qt Source when installing Qt.
- I tried going to Tools -> Options... -> Debugger -> General -> Add Qt sources..., but the paths seem to have changed a bit since bmanc commented four years ago. With Qt installed to C:\Qt\Qt5.6.0AndroidSource, I unsuccessfully tried the following paths: C:\Qt\Qt5.6.0AndroidSource\5.6 and C:\Qt\Qt5.6.0AndroidSource\5.6\Src
Any help on debugging Qt source (for Android on Windows) would be appreciated. Thanks!
-
@James_Wozniak I had the same problem with the windows Qt 5.6 version. So I had a look into the pdb files. There I found the new path which is "c:/users/qt/work/qt" for the Windows version. Maybe you can have a look into your debugging symbol files for Android and identify the new path.
TL;DR; If you want to jump into the qt source code while debugging, download source and map source path to "c:/users/qt/work/qt"
-
Sorry to bump an old topic like this but the problem is exactly the same as mine.
Like said in the topic, to be able to debug into Qt Sources, you are supposed with QtCreator to map the source file by going to Tools->Options->Debug->General->Add Qt sources
But even by doing so, it doesn't work for me and some help would be really appreciated to solve the issue.
(The destination path I give is C:\Qt\Qt5.7.0\5.7) -
@djvi
Had this bug, too, with the desctop version -- what came out of the button 'Add Qt-Sources' was not usable -- the source-attribute of both entries was not valid. By looking in the pdb-files I added manually an entry with attributes
source=c:/users/qt/work/qt
destination=C:\Qt\Qt5.6.0\5.6\Src.
Take a look into one of your pdb-files and then adapt the paths.
Added a screenshot of the debugger settings, hope it helps!