VS.NET:启用源服务器支持;无法从源服务器检索源文件
我已经为我当前的项目之一设置了符号服务器。 在夜间构建过程中,我:
- 构建我的源代码
- 将标签应用于构建索引中使用的源文件
- 必要信息
- pdb文件以及存储在MS符号服务器中的pdb文件的
(事实上,我已经遵循了这篇文章: 源服务器帮助您消除错误。
其符号已发布在另一个项目中。 我调试该项目,并且想要进入已发布调试符号的项目的代码。
我已经设置了 VS.NET,以便启用源服务器支持。 当我调试项目时,我可以看到(在“模块”窗口中)我引用的项目的符号确实已加载。 当我想要单步执行源自引用的 DLL 的方法时,VS.NET 会弹出一条警告,我必须确认 VS.NET 确实可以执行命令以从源服务器获取源代码。
该命令如下所示:(
ss.exe get -GL"c:\Users\... -GF -I-Y -W "$/MyProject/Source/..." -VL"specificversion"
为了简洁起见,我省略了完整路径)。
当我运行该命令时,出现错误“没有可用的源代码”。
当我在命令行上执行该命令时,出现错误:
无效的 DOS 路径
当目标路径不存在时,VSS 似乎会返回此错误。事实上,我的磁盘上不存在应放置检索到的源文件的本地路径。 VSS 应该创建它。
如何确保 VS.NET 发出命令,以便在从源服务器检索源代码时创建目标路径?
编辑: 我已经在我的追求中取得了更进一步的进展。 在我的源服务器计算机上,我编辑了 vss.pm
文件,并更改了“stream”中存在的 VSS_EXTRACT_CMD
变量中写入的命令' 写入 PDB 文件中。 我已将(Perl?)代码更改为:
push(@stream, "VSS_EXTRACT_CMD=if not exist %vsstrgdir% mkdir %vsstrgdir% | ss.exe get ".
"-GL\"%vsstrgdir%\" -GF- -I-Y ".
"-W \"\$/%var3%\" -VL\"%var4%\"");
因此,实际上我已添加“如果不存在... mkdir ...”部分,并且我用管道分隔了两个命令( |)。
在 VS.NET 中,我指定 VS.NET 发出的 SourceServer 命令也应该写入输出窗口中。 因此,当我复制在输出窗口中找到的命令并在命令提示符下执行该命令时,将创建目录并检索文件。 \o/
不幸的是,当 VS.NET 执行此操作时,不会检索文件,并且也不会创建目录... 关于问题可能是什么的任何想法吗?
编辑: 我已经在 Windows XP 机器上对此进行了测试,并且它有效。 我在办公室使用Windows Vista,但在Vista 上它不起作用。 VS.NET 似乎不允许创建目标目录?
I've set up a symbol-server for one of my current projects.
During a nightly build I:
- build my source
- apply a label to the sourcefiles that have been used in the build
- index the pdb files with the necessary information
- stored the pdb files in the MS symbol server
(In fact, I've followed this article: Source Server helps you kill bugs.
Now, I have referenced the DLL that has its symbols published in another project.
I debug that project, and I want to step into the code of the project that has published debug symbols.
I've set up VS.NET so that Source Server support is enabled.
When I debug my project, I can see (in the Modules window) that the symbols for my referenced project have indeed been loaded.
When I want to step into a method that originates from the referenced DLL, VS.NET pops up a warning where I must confirm that VS.NET may indeed execute a command to obtain the source code from the source server.
The command looks like this:
ss.exe get -GL"c:\Users\... -GF -I-Y -W "$/MyProject/Source/..." -VL"specificversion"
(I have ommitted the full paths for brevity).
When I run the command, I get the error 'no source code available'.
When I execute that command on the command line, I get the error:
Invalid DOS Path
It seems that VSS returns this error when the target path does not exists. Indeed, the local path where the retrieved source file should be put, does not exists on my disk.
VSS should create it.
How can I make sure that VS.NET issues a command so that the target path will be created when source code is retrieved from a source server ?
EDIT:
I've managed to get a little bit further in my quest.
On my Source Server machine, I've editted the vss.pm
file, and I've changed the command that is written in the VSS_EXTRACT_CMD
variable that exists inside the 'stream' that is written in the PDB file.
I've changed the (Perl?) code to this:
push(@stream, "VSS_EXTRACT_CMD=if not exist %vsstrgdir% mkdir %vsstrgdir% | ss.exe get ".
"-GL\"%vsstrgdir%\" -GF- -I-Y ".
"-W \"\$/%var3%\" -VL\"%var4%\"");
So, in fact I've added the 'if not exists ... mkdir ...' part to it, and I've separated the two commands with a pipe (|).
In VS.NET, I've specified that the SourceServer commands that are issued by VS.NET, should be written in the output window as well.
So, when I copy the command that I find in the output window, and I execute that command on the command prompt, the directory is created and the file is retrieved. \o/
Unfortunately, when VS.NET does this, the file is not retrieved, and the directory has not been created as well ...
Any ideas on what the problem could be ?
Edit:
I've tested this on a Windows XP machine, and, it works.
I use Windows Vista at the office, and on Vista, it doesn't work.
It seems like VS.NET is not allowed to create the target-directory ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论