Solved Loading Qt Call Stack in Visual Studio?
-
I'm not sure what exactly to search for, so apologies if this has been covered. But I couldn't find any post covering this.
If I run my Gui in QtCreator and it crashes, I can choose a debugger (Visual Studio being my only option). Visual Studio loads and the Call Stack is populated but the Language column all says "Unknown". Now I can choose the relevant .pdf by clicking on a line with a Qt Dll, let's say "Qt5Core.dll" and browse to my Qt folder to locate it. On my PC that's
C:\Qt\5.9.2\msvc2017_64\bin
. Doing this, some of the lines change and I can start to see references to classes, functions and line numbers.However, I'm then asked for the location of qobject.cpp, which is nowhere to be found on within my Qt installation.
Interesting enough, there's a path in the screenshot at the top:
c:\users\qt\work\qt\qtbase\src\corelib\kernel\qobject.cpp
But this is doesn't exist on my PC. Is one/some of the file(s) containing hardcoded paths to the machine where the source code was built before the installation binary was created?I've got Qt 5.9.2 MSVC2017 64bit, on a Win 7 PC.
-
@chadw
you also need to download the sources via the QtMaintainance tool
The proposed path comes from the path while Qt was built -
@chadw
you also need to download the sources via the QtMaintainance tool
The proposed path comes from the path while Qt was built -
Ahh, that makes things a lot easier.
Downloading the source for my version of QT, I could locate the above cpp file:
C:\Qt\5.9.2\Src\qtbase\src\corelib\kernel
Thank you!
-
PS. Couldn't mark your post as the correct answer, only my own. Could someone rectify that and mark @raven-worx's post as the correct solution?
-
@chadw I think this is a bug in the forum software - you can only mark your own posts.
Should hopefully work after the next update ;)