title: How to update the source location in symbol (.pdb) files
body: <p>What I am trying to do is run a batch script to update .pdb files to point to a different source location. I'm not sure if there is a way to update the absolute paths in the pdb file, but currently I'm looking into inserting a source stream into the pdb file so the debugger can get the source files.</p>
  
  <p>I am inserting a source stream using pdbstr.exe:</p>
  
  <pre><code>pdbstr -w -i:c:\test\pdbstream.txt -p:"C:\test\somelibrary.pdb" -s:srcrv
  </code></pre>
  
  <p>The pdbstream.txt contents are pretty basic:</p>
  
  <pre><code>SRCSRV: ini ------------------------------------------------
  VERSION=1
  SRCSRV: variables ------------------------------------------
  SRCSRVTRG=%var1%
  SRCSRVCMD=cmd echo %var1% &gt;&gt; c:\test\output.txt
  SRCSRV: source files ---------------------------------------
  C:\somedifferentpath\somelibrary\sources\firstclass.cs
  C:\somedifferentpath\somelibrary\sources\secondclass.cs
  SRCSRV: end ------------------------------------------------
  </code></pre>
  
  <p>According to the info on <a href="https://msdn.microsoft.com/en-us/library/ms680641.aspx" rel="nofollow noreferrer">MSDN</a> I added only the required parameters. To my understanding, this should run the command in the SRCSRVCMD variable when the debugger loads the pdb file and searches for the source files. So I would expect some output in c:\test\output.txt.</p>
  
  <p>I have verified that the correct pdb file is loaded for the module, but when i'm debugging in Visual Studio it does not find any source file. The output shows:</p>
  
  <pre><code>"SRCSRV: The module 'C:\test\somelibrary.dll' does not contain source server information."
  </code></pre>
  
  <p>Is the source stream not valid, or am I simply overlooking a particular step? Or can I change the absolute source location in the pdb file without inserting a datastream?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>To clarify, I am currently using the Visual Studio debugger. The code I am trying to debug is in private libraries I created myself. I want the .pdb files to point to the correct source files after everything (dll, pdb &amp; source files) is moved to a different location on disk.</p>