3

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 "git@github.com: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 "git@github.com: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
GIT_ORIGIN_NODE=git@github.com: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?

icn
  • 17,126
  • 39
  • 105
  • 141
  • from where did you get `04898e9268d374a9a503e4c138b27f01b7553a3e` between the double quotes from? and what does that mean? – uday Jan 26 '12 at 22:37
  • I think the whole command has been generated and been pushed to pdb file when I ran gitindex.cmd. And It should be from pdb file – icn Jan 26 '12 at 22:42
  • but its looks like a stray component out there. – uday Jan 27 '12 at 01:16
  • @Dave gitcontents.bat takes four arguments, it is third one – icn Jan 27 '12 at 01:18
  • could you try placing it in double quotes? because it cannot really see it as an argument. – uday Jan 27 '12 at 01:19
  • the SourceServer-GitExtension project archive can be find here https://github.com/ccyang/SourceServer-GitExtensions – mostafa88 May 15 '17 at 12:02
  • Archive is here now :) https://github.com/rooflz/SourceServer-GitExtensions – Priyank Dec 16 '19 at 01:57

2 Answers2

0

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?

intinit
  • 480
  • 4
  • 14
  • You can see documentation on predefined pipeline variables here: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml – Tomer W May 14 '20 at 02:47
-1

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.

Shonn Lyga
  • 109
  • 2
  • 8
  • Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. From [How to Answer](http://stackoverflow.com/help/how-to-answer). – Gustavo Morales Jun 08 '16 at 17:34