Geeks With Blogs

News




View Tarun Arora's profile on LinkedIn

profile for Tarun Arora at Stack Overflow, Q&A for professional and enthusiast programmers

Tarun Arora - Visual Studio ALM MVP ALM, Agile, Automation, Performance Testing, Software QA, Cloud, ...

I don’t think I need to call out the importance of Indexing Source Symbols, in case you need a reminder read the benefits of symbols here. Recently I wrote a blog post on the Microsoft ALM blog describing the improvements made to the Visual Studio debugger, this also improves the overall user debugging experience. TFS Service doesn’t index the source symbols, of course if you think this would be a cool feature, please vote for this feature request here. TFS Service build engine however, gives you the option to specify a file share to index the symbols. This file share however, needs to have a public endpoint for the TFS Service to write to it. There isn’t any guidance available on how you can configure such a public share and associate it with TFS Service.

In this blog post, I’ll show you how to use Windows Azure to set up a File Server with a public endpoint and associate that with the TFS Service build to index symbol servers. We’ll also cover how you can consume these symbols from with in Visual Studio while debugging.

Let’s get started…

01 – Create a public File Server using Windows Azure

Utilize the following procedure to configure a Windows Azure Virtual Machine (VM) instance for use as a File Server.

  • Create the File Server VM instance (e.g. “MyFileServer.cloudapp.net”) using the Windows Azure portal. See reference instructions here.  
  • Attach and format a blob-storage hosted data-disk to the VM.  
  • Using the Server Manager Console, enable the File Server Role.

          image 

  • Create a File Share folder (e.g. “Symbols”) on the attached data-disk and enable read/write access for Everyone.

          image

  • Add two endpoints to the VM for both TCP port 445 and UDP port 445.

          image

  • Disable username & password – Go to network and sharing center, go to advanced settings and disable Password Protect Sharing (details here).

        image

 

Note – You will encounter the following error in TFS service in case you do not set ‘Turn off Password protect sharing’.

SYMSTORE ERROR: Class: Server. Desc: Couldn't connect to server. Error 1326: Logon failure: unknown user name or bad password.
TF270015: 'symstore.exe' returned an unexpected exit code. Expected '0'; actual '1326'. See the build logs for more details.

02 – Associating the File Server with TFS Service

  • Create a new build or edit an existing build definition and open the Process Tab, look out for the Source and Symbol Server Setting. Enter the Public IP address of the VM followed by the File Share name. For example in our case the File Share name is “Symbols” and the IP address of the machine “myFileSever.cloudapp.net” is 168.63.9.211, so the network share path becomes \\168.63.9.211\Symbols

         image

  • Trigger the build and you’ll see that the symbols are now being indexed at the said location. Let’s look at the TFS Service build log.

         image

  • Also, let’s also look at the contents of the folder where the symbols have been published.

         image

So, now that the symbols from our TFS Service elastic build are successfully indexing in our Windows Azure File Share, let’s look at how these symbols can be consumed from with in Visual Studio while debugging.

03 – Debugging with Visual Studio

To get Symbol support while debugging in Visual Studio, you need to configure the below settings in Visual Studio.

  • Go to Tools –> Options –> Debugging –> Symbols. Here you need to specify the network share where the symbols have been dropped by the build. 

           image

  • Go to Tools –> Options –> Debugging –> General. Here you need to enable source server support, additional options have been added, choose if they apply to your use case.

          image

 

In Summary, no excuses for not indexing the symbols from the builds executed using the elastic build on TFS Service…

I hope you find this blog post useful… If you have any feedback please feel free to leave a comment. Thank you for taking the time out and reading this blog post. If you enjoyed the post, remember to subscribe to http://feeds.feedburner.com/TarunArora. Stay tuned!

Posted on Sunday, April 7, 2013 3:23 PM TfsService , TFS2012 , Azure | Back to top


Comments on this post: TFS Service - Configure Source and Symbol Server Settings

comments powered by Disqus

Copyright © Tarun Arora [Microsoft MVP] | Powered by: GeeksWithBlogs.net