Visual Studio (Microsoft) 带有 git 的符号服务器

发布于 2024-12-29 14:43:00 字数 3194 浏览 1 评论 0原文

我正在尝试使用 git 设置 Microsoft Symbol Server。我四处搜索,发现这个

https://github.com/joliver/SourceServer-GitExtensions

我遵循说明的每一步。

当我尝试调试时,我从 Visual Studio 中弹出了窗口

gitcontents.bat "[email protected]:Myconpany/Myproject.git (fetch)" "C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\.localRepo" 04898e9268d374a9a503e4c138b27f01b7553a3e "C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs"

,并且我运行了命令,但出现了此错误

fatal: bad object 04898e9268d374a9a503e4c138b27f01b7553a3e

不确定出了什么问题。是因为我有多个分支,我是否必须指定我想要在那里获取的特定分支?

这是我用来生成索引的命令

gitindex.cmd  -debug -source=<sourcedir> -symbols=<pdb file dir>

我尝试对我的 pdb (SymbolServerTests.pdb) 文件运行这些命令

Srctool.exe SymbolServerTests.pdb

[C:\data\Myrpoject\SymbolServerTests\SymbolServerTests\CodeTest.cs] cmd: gitcontents.bat "[email protected]:Myconpany/Myproject.git (fetch)" "C:\data\Myproject\bfef70fcb1efef501a09d451517a24f049383e28\.localRepo" 04898e9268d374a9a503e4c138b27f01b7553ae3 "C:\data\Myproject\bfef70fcb1efef501a0
9d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs"

SymbolServerTests.pdb: 1 source files are indexed

pdbstr -r -p:SymbolServerTests.pdb -s:srcsrv

SRCSRV: ini ------------------------------------------------
VERSION=1
INDEXVERSION=2
VERCTRL=Git
DATETIME=Thu Jan 26 10:53:05 2012
SRCSRV: variables ------------------------------------------
GIT_REPO_ID=bfef70fcb1efef501a09d451517a24f049383e28
[email protected]:Mycompany/Myproject.git (fetch)
GIT_EXTRACT_TARGET=%targ%\%GIT_REPO_ID%\%var2%\%fnfile%(%var1%)
GIT_EXTRACT_CMD=gitcontents.bat "%GIT_ORIGIN_NODE%" "%targ%\%GIT_REPO_ID%\.localRepo" %var2% "%git_extract_target%"
SRCSRVTRG=%GIT_extract_target%
SRCSRVCMD=%GIT_extract_cmd%
SRCSRV: source files ---------------------------------------
c:\data\myproject\symbolservertests\symbolservertests\codetest.cs*04898e9268d374a9a503e4c138b27f01b7553a3e
SRCSRV: end ------------------------------------------------

UPDATE : 我觉得我有一些进步。我已将文件签出到此位置。

C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs

但我得到了

确定校验和是否匹配以下地点: 1:C:\ Users \ myusername \ AppData \ Local \ SOURCE〜1 \ bfef70fcb1efef501a09d451517a24f049383e82 \ 26348c09499b843558a4cc676c0d17a83327d56e \ codetest.cs校验和:MD5 {60 d6 36 20 c3 af c8 31 eb 32 50 3f 27 6b 2f d8} 校验和不匹配

pdb中的校验和是在哪里计算的?

I am trying to set up Microsoft Symbol Server with git. I have searched around and found this

https://github.com/joliver/SourceServer-GitExtensions

I followed every single step of the instructions.

When I tried to to debug in I got pop up windows from Visual Studio

gitcontents.bat "[email protected]:Myconpany/Myproject.git (fetch)" "C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\.localRepo" 04898e9268d374a9a503e4c138b27f01b7553a3e "C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs"

And I ran the command I got this error

fatal: bad object 04898e9268d374a9a503e4c138b27f01b7553a3e

Not sure what went wrong. Is that because I have multiple branches, do i have to specify specific branch I want to fetch somethere?

This is the command I used to generate index

gitindex.cmd  -debug -source=<sourcedir> -symbols=<pdb file dir>

I tried to run these commands against my pdb (SymbolServerTests.pdb) file

Srctool.exe SymbolServerTests.pdb

[C:\data\Myrpoject\SymbolServerTests\SymbolServerTests\CodeTest.cs] cmd: gitcontents.bat "[email protected]:Myconpany/Myproject.git (fetch)" "C:\data\Myproject\bfef70fcb1efef501a09d451517a24f049383e28\.localRepo" 04898e9268d374a9a503e4c138b27f01b7553ae3 "C:\data\Myproject\bfef70fcb1efef501a0
9d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs"

SymbolServerTests.pdb: 1 source files are indexed

pdbstr -r -p:SymbolServerTests.pdb -s:srcsrv

SRCSRV: ini ------------------------------------------------
VERSION=1
INDEXVERSION=2
VERCTRL=Git
DATETIME=Thu Jan 26 10:53:05 2012
SRCSRV: variables ------------------------------------------
GIT_REPO_ID=bfef70fcb1efef501a09d451517a24f049383e28
[email protected]:Mycompany/Myproject.git (fetch)
GIT_EXTRACT_TARGET=%targ%\%GIT_REPO_ID%\%var2%\%fnfile%(%var1%)
GIT_EXTRACT_CMD=gitcontents.bat "%GIT_ORIGIN_NODE%" "%targ%\%GIT_REPO_ID%\.localRepo" %var2% "%git_extract_target%"
SRCSRVTRG=%GIT_extract_target%
SRCSRVCMD=%GIT_extract_cmd%
SRCSRV: source files ---------------------------------------
c:\data\myproject\symbolservertests\symbolservertests\codetest.cs*04898e9268d374a9a503e4c138b27f01b7553a3e
SRCSRV: end ------------------------------------------------

UPDATE : I think I got some improvement. I have the file checked out to this location.

C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e28\04898e9268d374a9a503e4c138b27f01b7553a3e\codetest.cs

But I got

Determining whether the checksum matches for the following locations:
1: C:\Users\myusername\AppData\Local\SOURCE~1\bfef70fcb1efef501a09d451517a24f049383e82\26348c09499b843558a4cc676c0d17a83327d56e\codetest.cs Checksum: MD5 {60 d6 36 20 c3 af c8 31 eb 32 50 3f 27 6b 2f d8} Checksum doesn't match.

Where the checksum in pdb has been calculated?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清君侧 2025-01-05 14:43:00

我注意到 SourceIndexer 代码中使用了 %published_artifacts_src% 。这有记录在任何地方吗?我已经开始使用它,它似乎正在工作,但现在它返回符号服务器的空路径。有什么线索可以解释为什么会这样吗?

I've noticed the use of %published_artifacts_src% in the SourceIndexer code. Is this documented anywhere? I have started using it, and it seemed to be working, but now it is returning an empty path to the symbol server. Any clues as to why that might be?

一场春暖 2025-01-05 14:43:00

Perl 脚本太神秘了,无法按照我的口味来处理。

在这篇博客文章中,我描述了这个过程使用 GitLink 为 Visual Studio 源服务器设置 Git 支持,该服务器使用普通的 ol' c# 来索引我的符号。它是一个位于 GitHub 上的开源库。

该库允许我设置通过 PowerShell 检索源的方法(在 .pdb 文件中),这允许我在请求中使用查询参数,这与 Visual Studio 调试器中默认使用的工具不同。

Perl scripts are too cryptic to deal with in my taste.

In this blog post i described the process of setting up Git support for Visual Studio source server with GitLink that uses plain ol' c# to index my symbols. It is an open source library that lives on GitHub.

This library let me set the method (in the .pdb file) for retrieving sources via PowerShell, which allows me to use query parameters in the request, unlike the tool used by default in Visual Studio debugger.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文