How do I change the locations of source files in a symbols file (pdb)

后端 未结 4 1858
旧时难觅i
旧时难觅i 2020-12-14 17:25

Basically what I want to do it this: a pdb file contains a location of source files (e.g. C:\\dev\\proj1\\helloworld.cs). Is it possible to modify that pdb file

4条回答
  •  旧时难觅i
    2020-12-14 17:30

    If you're looking to be more generic about the paths embedded in a pdb file, you could first use the MS-DOS subst command to map a particular folder to a drive letter.

    subst N: 
    

    Then open your project relative to the N: drive and rebuild it. Your PDB files will reference the source files on N:. Now it doesn't matter where you place that particular set of source files, so long as you subsequently call the root directory "N:" like you did when you built it.

    This practice is recommended by John Robbins in his excellent book, Debugging Applications for Microsoft .NET and Microsoft Windows.

提交回复
热议问题