Visual Studio转储分析:如何找到从源代码控制中检索源代码的命令

Visual Studio dump analysis: how to find the command which retrieves source code from source control

在我的公司,人们曾经使用 Visual SourceSafe,但几年前他们决定开始使用 GIT。
我几个月前开始在这里工作,因此我从未设置过 Visual SourceSafe 环境。

在调试旧版本的转储时,这会产生问题:转储(使用 procdump 获取)似乎包含使用 Visual SourceSafe 检索源代码的命令。

我刚刚安装了 Visual SourceSafe,我希望这样可以获得旧版本的源代码,但事实并非如此。 (供您参考,即使安装了 Visual SourceSafe,我也没有在 Visual Studio 的 "Team Explorer - Connect" window 中看到任何 SourceSafe 信息)

(原题包含了相当多的调查信息,现在已经知道这个问题的答案,这些信息似乎已经过时了)

事物之间的关系

[...] it seems that the dumps (taken using procdump) contain commands for retrieving source code, using Visual SourceSafe.

故障转储不包含命令。它包含有关已加载的 EXE 和 DLL 的版本信息。 WinDbg 和 Visual Studio 然后将查找与该版本信息匹配的 PDB 文件。 PDB 文件然后包含有关源代码的信息。

要查找 PDB,您需要一个符号服务器 and/or 一个带有符号的本地路径。

SourceSafe

I've just installed Visual SourceSafe, and I was hoping that this would make it possible to get the older versions of the source code, but this is not the case.

安装 SourceSafe 没有帮助。您需要使用 Visual SourceSafe Admin 连接到存储库并授予自己访问权限。

然后,使用 Visual SourceSafe(不是 Admin)映射本地文件夹 ("Set working folder") 并拉取 ("Get latest version")。然后您在本地拥有源代码,您可以指示您的工具使用该路径。对于 WinDbg,.srcpath.lsrcpath 应该是正确的。

如果你真的想用源代码分析,你可能需要按日期获取不同的版本。要自动执行此过程,您需要一个源服务器,但如果您有的话,您会知道的。

垃圾场的年代

你说:

[...] some years ago they decided to start working with GIT.

因此您的源代码应该在 GIT 中,而不是在 SourceSafe 中。

如果您的故障转储文件太旧以至于它引用了 SourceSafe,则将其视为已过时并进行新的转储。如果最近没有人抱怨崩溃,我将不再关心(作为前测试经理说)。

难以置信:这个问题是因为SourceSafe安装似乎没有完成:

为了使其正常工作,需要完成以下工作: 将 SourceSafe 目录添加到 $PATH$ 环境变量 (C:\Program Files (x86)\Microsoft Visual SourceSafe)

创建 $SSDIR$ 环境变量,以便 SourceSafe 知道在哪里寻找源代码(应参考包含 srcsafe.ini 文件的目录)。