Using ProGet's Symbol Server

ProGet Enterprise includes an integrated symbol/source server that makes .pdb symbol files stored in a Feed's packages accessible directly from a debugger such as Visual Studio.

Building Symbol Packages

In order to use a symbol server, you must first have NuGet packages with symbols (and optionally source files) in them. The official NuGet documentation has some background information on package conventions with respect to symbol files. You may choose to follow these conventions and create separate "symbol packages" in addition to your standard packages, or you may include all of the symbols and source in your standard package: ProGet will work either way. (If you choose to not use separate symbol packages, ProGet will automatically strip out symbols and source from the package when it is requested.)

Getting Symbols in Visual Studio

Once you have symbol packages in your Feed, you will need to tell Visual Studio where to look for them when you are debugging. Select Tools->Options from the Visual Studio menu, expand the Debugging item on the tree, and finally select Symbols. This will display Visual Studio's symbol server options dialog. Visual Studio Symbol Server Configuration

Click the Add Server icon and type your ProGet symbol server URL as shown in the above image, replacing proget with your ProGet server name and Default with your Feed name.

The Symbol Cache Directory specifies a path on your local drive for Visual Studio to download symbols and source files to. If you leave this blank, a path will be generated for you. Keep in mind that Visual Studio will always look in this path first before even attempting to download anything from a symbol/source server, so if you are having issues with incorrect symbol or source files, you may need to clear this cache.

Getting Source in Visual Studio

On their own, symbol files are only of limited use in debugging. If your packages also contain source code, ProGet will also act as a source server, allowing the correct code to be retrieved by Visual Studio along with the symbols.

To enable source server support in Visual Studio, select Tools->Options and once again expand the Debugging item on the tree. This time, select General to display the general debugging options. Visual Studio Debugging Configuration

Check the box next to Enable source server support to enable source server support in Visual Studio. Also, uncheck the Just My Code box or you will not be able to step into source files from your NuGet packages.

Limitations

Currently, ProGet will only serve symbols and source for local packages. It will not expose files via the built-in symbol server from connector packages. If you would like to retrieve symbols from an addtional symbol server, simply add the other server to Visual Studio's list of symbol servers.

Last modified: 9/26/2013

This content has the following tags:

progetfeedspackagessymbolssource