Search code examples
visual-studio-2015symbolsdebug-symbolspdb-files

Symbol Server - Move Files, move source code


We recently upgraded TFS 2012 to TFS 2017. Now we have some challenges

Symbol files do download as expected from our new symbol server, but... the symbol files no longer locate the source code files. All we get now is a MetaData reference.

I am sure I am setting up the symbol server correctly since the symbol cache is loaded with all the correct symbol files.

What appears to be the problem is despite Visual Studio having the symbol file, Visual Studio debugger cannot locate the symbol file's corresponding source code file.

Would upgrading TFS cause this to happen? Would moving source code files to a new folder impact this? I am at a loss as to how Symbol files FIND the source code files... how does this work so I can figure out the problem?


Solution

  • OK I found out how MS expects us to clean this up.

    If you move your Version Control Server or change the VC Server Hostname you can do one of two things:

    a. Add a srcsrv.ini file to your debugging sdk folder that has the new hostname. The debugger should pick up the new servername in the ini file and override what's in your pdb.

    OR

    b. You can update each pdb with pdbstr.exe with the new servername

    I have yet to get A to work. There seems to be conflicting documentation as to where to put your srcsrv.ini file and no clear indication of the variable name to use for the TFS hostname value.

    B is the break down the door approach, but Powershell serves nicely. There were 1200+ dlls to update. Powershell did all but a dozen of them.

    I am still trying to figure out those last 12 issues now.