如何提取存储在 exe 中的路径(pdb 文件)?

How to extract paths (pdb file) that are stored in an exe?

构建可执行文件时,它会存储它生成的 pdb 文件的路径。我有可执行文件,如何找到给定的路径?

答案是 link 实用程序。当您 运行 VS2015 的开发人员命令提示符时可用。

c:\>link -dump -headers c:\path\app.exe

pdb 文件路径在调试目录部分。

该工具仅可从 visual studio 命令行获得,这一点毫无意义,如 here 所述。

You can start this tool only from the Visual Studio command prompt. You cannot start it from a system command prompt or from File Explorer.