Setting up TeamCity as Symbol and Source Server
It’s been some time since we created a plugin which allows using TeamCity as a symbol and source server, and now, after some bug-fixing has been done, we decided we are ready to announce it officially.
So please welcome the TeamCity Symbol Server plugin! With just a few mouse clicks you can set up TeamCity to index the .PDB files and binaries for all your .Net applications and, once the plugin is enabled, you can easily debug applications or analyse crash dumps: your debugger will be able to automatically retrieve the required symbol files and to download the sources of the appropriate version for shared libraries referenced by you application, if, say, these modules are developed by a different team in your company and shared between several projects.
To set up TeamCity as a Symbol and Source server, we assume you have the following:
- TeamCity server 8.0.3 or later with a project and build configuration to build your application.
- Debugging Tools for Windows on the agent machine(s) where your application is built (can be installed using this link).
Now all you need to do is enable the TeamCity Symbol Server plugin in TeamCity and set a number of options in your debugger.
Download and install the plugin
- Since the plugin is not bundled with TeamCity, download the required version from here and install the plugin as usual.
- Now enable the symbol server on the Administration| Integrations| Symbol Server page. You will see that it is referenced by the following URL
< TEAMCITY_SERVER_URL>/app/symbols. This is the URL to be used in the Visual Studio or windbg settings.
The permissions required to access symbols and sources via the TeamCity server are default for the project developer role, and the indexed data can be accessed in both public (not requiring authorization) and authorized modes.
Tune the build configuration settings
Next we need to add the Symbol Files indexer build feature to our build configuration settings:
Once you add the feature and save the settings, all PDB files published as build artifacts of this configuration and all related sources will be indexed.
Next let’s take a look at the files we are publishing as build artifacts. In this setup we are building an application referencing a dll and we are publishing a .zip archive which includes the application along with the PDB file and the library:
The plugin can handle the PDB files published separately or packed using the TeamCity artifact publishing rules.
The file containing symbol files signatures is published internally and is available in the TeamCity internal artifacts under
Set the debugger options
Now we need to set a few options in the debugger, Visual Studio in this case:
- In the Debug menu, select Options and Settings, in the General section uncheck the default Enable Just My Code and Require source files to exactly match the original version options.
If you do not have the source code on the local machine or the .pdb file does not match the source code, you can use Source Server to find and download the sources: select Enable source server support and check all the options in that section.
- During a debugging session in Visual Studio, the debugger automatically loads symbol files that are located in the project directory. To specify TeamCity as a symbol server, select the Symbols section on the left and add the TeamCity symbol server URL ( from the Administration| Integrations| Symbol Server page) to the list of symbol file locations.
On the Symbols page you can also filter out or specify modules that you want the debugger to automatically load symbols for. These settings can be changed manually when you are debugging.
- Save your changes.
Now your debugger will load the required symbol and source files from TeamCity enabling you to successfully debug applications and crash dumps!
Try out the TeamCity Symbol Server plugin and let us know what you think!
Happy building and debugging!
Subscribe to Blog updates
Thanks, we've got you!
Critical Security Issue Affecting TeamCity On-Premises – Update to 2023.05.4 Now
A critical security issue was recently identified in TeamCity On-Premises. Please upgrade to 2023.05.4 now.
How Gradle Uses TeamCity to Run 30,000 Green Builds Per Day
In this case study, we’ll take a deep look into how Gradle Build Tool uses TeamCity to run tens of thousands of builds a day, while keeping the failure rate under control.
How To Choose a CI/CD Tool: A Framework
In this blog post, we offer general guidelines for selecting an appropriate CI/CD solution and delve into how TeamCity fits into this framework.