Rigel
Rigel

Reputation: 95

VS2013 debugger can no longer resolve system environment variable containing source code path

I am currently using Visual Studio 2013 (Update 4) for building Qt5.4.0 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.

When debugging my projects I sometimes try to step into Qt library code. To do this I added the path to the Qt source codes to the solution properties->Debug Source Files setting like described in a former post (VS2013 debugger can not find Qt sources).

Because I have many different projects and it would be a pain to update all of them in case of a Qt update I used a system environment variable "QTSRC" pointing to that path and added the following line to the solution: $(QTSRC)

This worked like charm some time ago (with an older update of VS and a former Qt version 5.x).

But unfortunately it does not work anymore. It seems that VS now totally ignores the system environment variable (it also does not show any errors when I check the "check entries" button in the dialog).

Does anybody know what changed here lately and what must be done to fix this? It would be very annoying to add the path hardcoded to every project (which still works) and have to do this over and over again after Qt updates.

Upvotes: 1

Views: 112

Answers (1)

JCx
JCx

Reputation: 2769

I'd look at the Property Pages which will allow you to set user defined values that you can share across different projects:

http://msdn.microsoft.com/en-us/library/675f1588.aspx

I use them to set global include paths, but it looks like you can set almost anything there. Set things in the .User pages if you want them used for all your projects but not included in the solution or project file itself.

A good, short, guide is here:

http://www.curlybrace.com/words/2012/12/17/setting-global-c-include-paths-in-visual-studio-2012-and-2011-and-2010/

Upvotes: 2

Related Questions