Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Qt Creator and debugging Qt sources
I would like to debug the Qt under the Qt Creator.
I downloaded the latest source code from the repository, then it was built to debug version and Qt Creator Tools->Options->Qt4 was updated to point to the new built directory (new debug build configuration is visible in project's build settings).
It looks that I missed something because I can not step into the Qt sources during debugging the simple application.
Does anyone have the same problem ? Do I need to configure GDB separately ?
Operating system: Linux Fedora 15
Qt Creator: 2.2.1
g++ (gcc): 4.6.0
So if you add a break point anywhere in your code, it won't stop there during debugging? Thats really odd.
I have the simple code like this (the environment like in my first post):
int main(int argc, char *argv)
QApplication a(argc, argv);
QLabel* label = new QLabel(); label->setText("TEST"); label->show(); return a.exec();
I put the break point on the line
and it stops there successfully. Then I would like to step into to the setText() method but Qt Creator does not see the Qt sources.
Oh I see. Well, my first advice would be to read "this":http://stackoverflow.com/questions/5049578/need-to-step-into-qt-sources-my-ide-is-qt-creator and "this":http://stackoverflow.com/questions/3395048/how-to-see-qt-source-code-while-coding-by-qt-creator . I followed these steps and I never encountered your problem.
Thanks for the link but I saw them before. Maybe this is the problem (bug?) with Qt Creator ?
Can you access the source files if not in debug mode?
What do you mean ? "Follow symbol under cursor" ? It looks like the headers file are accessible only...
Yup, I meant that. It seems like something went wrong with the build, try to rebuild everything from source.
lgeyer last edited by
Qt Creator > Tools > Options > Debugger > Source Path Mapping > Add / Add Qt sources...
I rebuilt the library and installed into default location and now it works fine. Thank you for help!
You're welcome. Please set your thread as [SOLVED] if you're problem is gone :)