You can now get full symbols and source along with the nightly NuGet packages making it possible to debug the latest MVC, Web API, and Web Pages bits by tracing directly through the source. This is enabled by SymbolSource, which hosts the symbols and source for the nightly NuGet packages, and MyGet which hosts the nightly NuGet feed. Great services!
If you want to use the nightly NuGet packages then please see Using Nightly ASP.NET Web Stack NuGet Packages for getting started. Please remember that the nightly NuGet packages are “raw” and come with no guarantees.
Configuring Visual Studio
The instructions apply to both Visual Studio 2010 and 2012 and works in both full and express editions.
First open the Debug | Options and Settings menu, go the General tab and do the following:
- Uncheck Enable Just My Code
- Check Enable source server support
- Uncheck Require source files to exactly match the original version
It should look something like this:
Now go to the Symbols tab and add http://srv.symbolsource.org/pdb/MyGet to the list of symbols locations. Also, make sure you have a short path for the symbols cache as the file names otherwise can get too long resulting in the symbols not getting loaded properly. A suggestion is to use C:\SymbolCache. It should look something like this:
For more details, please check out these instructions from symbolsource.org.
Trying it Out
Let’s try this out on the Validation Sample project which is one of the ASP.NET Web API samples. After updating the NuGet packages to use the nightly feed, start the debugger. First we set a break point in the sample in PostValidCustomer method which is hit as expected:
Now we hit F11 to step into the next statement and it takes us to the JsonMediaTypeFormatter class in ASP.NET Web API:
If you have issues or questions then please follow up on the Symbols for nightly builds available discussion thread.