'How to debug/step into QT SDK sources from my project

I want to debug, set break points etc in QT SDK sources, I have QT5.5.0 built with symbols and symbols are picked up, at lest GDB says so. But I still cannot debug into for Example QGuiApplication, well I don't really care about QGuiApplication but I want to be able to set break point anywhere in QT Sources and stop there when my code get there. I do have QT 5.5.0 project opened alongside with my project, but setting break point in QT5.5.0 does not have any effect, also stepping into any QT SDK code simply does nothing, it just stays where it was stopped by breakpoint in my project.

So question is how can I place breakpoints in QT SDK code anywhere I want and when I debug my project I will be able to stop in QT code. And how can I step into QT SDK code.

Ubuntu 14.04, QT 5.5.0, Creator 3.6.0, QNX ( ARM platform ) but it is irrelevant.



Solution 1:[1]

Don't install any QT binary (qtcore/qtgui),

  1. build from source and
  2. intall them with debug symbols, should be around 200~300M each library.
  3. Make sure your example code is loading the debug version of qt files.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Felix Xu