How to properly set debug information path for Qt sources in Qt Creator (mingw32)?
-
I'm using Qt Creator 10.0.2 in Windows. My building kit is Qt 5.15.2 and it's installed using official Qt online installer, the version is opensource. The components I've installed shown below:
The kit is installed by default to C:\Qt\5.15.2 which contains "Src" (source code) and "mingw81_64" folders. In mingw81_64 I have Qt libraries in the "bin" folder, and *.dll.debug debug information files in the "lib" folder respectively.
When I'm starting to debug, for example, in main.cpp I have QApplication constructor, which I stepping into. I can do it only in assembly code mode. But I can't switch to the cpp source code. The error I see is shown bellow in a tooltip:
It says: "Binary debug information is not accessible for this frame. This either means the core was not compiled with debug information, or the debug information is not accessible."
I have tried this command for gdb:
set debug-file-directory C:\Qt\5.15.2\mingw81_64\lib
but that doesn't seem to help.
But when I copy content of "lib" folder into "bin" folder everything works fine. So it seems like gdb can't find debug information path properly. So the question is how to set that path. Should I do it myself? Shouldn't that functionality work out of box after installation?
-
Check what's written in
Settings
->Debugger
. What path is set there? You need to set the path to your Qt installation there.
Click "add Qt source" and select the path where yoursrc
directory is.
(in your caseC:\Qt\5.15.2\Src
) -
C Christian Ehrlicher moved this topic from General and Desktop on