VS2013 debugger can not find Qt sources

≡放荡痞女 提交于 2019-12-11 11:52:22

问题


I am using Visual Studio 2013 for building Qt5.3.1 projects. I use the express version so I don't use the VS plugin. My .vcxproj files a generated from .pro files using build scripts and qmake.

I installed Qt 5.3.1 with the default offline installation package that can be downloaded from the project pages. During installation I enabled sources to be installed (which are not installed by default).

When debugging my projects I sometimes try to step into Qt library code. This unfortunately does not work anymore (I know it once worked for some older Qt version but I can't name it). The .pdb files are found (I checked this in VS modules view) but the source files are not found. Whenever I step into Qt library code the debugger asks me to search the needed source file manually using a file dialog. If I select the proper .cpp file somewhere in the Qt folder the debugger works fine and I can step through the code. Unfortunately I need to repeat this for every Qt library source file and it is pretty annoying.

Is there a way to tell VS how to find the sources files in the Qt folder by itself?


回答1:


Open your VS, right click on the solution (in German: "Projektmappe"), then click on "Debug Source Files" (German: "Quelldateien debuggen") and add the needed source file directory.

Tipp: You can also use system environment variables (like "$(QTSRC)") here.



来源:https://stackoverflow.com/questions/25093478/vs2013-debugger-can-not-find-qt-sources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!