{"id":2224,"date":"2012-08-30T14:00:55","date_gmt":"2012-08-30T14:00:55","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2012\/08\/30\/getting-symbols-and-source-with-asp-net-nightly-nuget-packages\/"},"modified":"2022-08-10T06:29:05","modified_gmt":"2022-08-10T13:29:05","slug":"getting-symbols-and-source-with-asp-net-nightly-nuget-packages","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/getting-symbols-and-source-with-asp-net-nightly-nuget-packages\/","title":{"rendered":"Getting Symbols and Source with ASP.NET Nightly NuGet Packages"},"content":{"rendered":"<p>You can now get full symbols and source along with the nightly NuGet packages making it possible to debug the <a href=\"http:\/\/aspnetwebstack.codeplex.com\/\">latest MVC, Web API, and Web Pages<\/a> bits by tracing directly through the source. This is enabled by <a href=\"http:\/\/www.symbolsource.org\/\">SymbolSource<\/a>, which hosts the symbols and source for the nightly NuGet packages, and <a href=\"http:\/\/www.myget.org\/\">MyGet<\/a> which hosts the nightly NuGet feed. Great services!<\/p>\n<p>If you want to use the nightly NuGet packages then please see <a href=\"http:\/\/blogs.msdn.com\/b\/henrikn\/archive\/2012\/06\/01\/using-nightly-asp-net-web-stack-nuget-packages-with-vs-2012-rc.aspx\">Using Nightly ASP.NET Web Stack NuGet Packages<\/a> for getting started. Please remember that the nightly NuGet packages are \u201craw\u201d and come with <strong>no<\/strong> guarantees.<\/p>\n<h2>Configuring Visual Studio<\/h2>\n<p>The instructions apply to both Visual Studio 2010 and 2012 and works in both full and express editions.<\/p>\n<p>First open the <strong>Debug | Options and Settings<\/strong> menu, go the <strong>General<\/strong> tab and do the following:<\/p>\n<ol>\n<li>Uncheck <strong>Enable Just My Code<\/strong><\/li>\n<li>Check <strong>Enable source server support<\/strong><\/li>\n<li>Uncheck <strong>Require source files to exactly match the original version<\/strong><\/li>\n<\/ol>\n<p>It should look something like this:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/0407.DebugOptions_thumb_5FE47806.png\"><img decoding=\"async\" title=\"DebugOptions\" style=\"margin-right: auto;margin-left: auto;float: none\" border=\"0\" alt=\"DebugOptions\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/0407.DebugOptions_thumb_5FE47806.png\" width=\"504\" height=\"294\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>Now go to the <strong>Symbols<\/strong> tab and add <strong>http:\/\/srv.symbolsource.org\/pdb\/MyGet<\/strong> 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 <strong>C:SymbolCache<\/strong>. It should look something like this:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/0081.DebugSymbols_thumb_1484D442.png\"><img decoding=\"async\" title=\"DebugSymbols\" style=\"margin-right: auto;margin-left: auto;float: none\" border=\"0\" alt=\"DebugSymbols\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/0081.DebugSymbols_thumb_1484D442.png\" width=\"504\" height=\"294\" \/><\/a><\/p>\n<p>For more details, please check out these <a href=\"http:\/\/www.symbolsource.org\/Public\/Home\/VisualStudio\">instructions from symbolsource.org<\/a>.<\/p>\n<h2>Trying it Out<\/h2>\n<p>Let\u2019s try this out on the <a href=\"http:\/\/aspnet.codeplex.com\/SourceControl\/changeset\/view\/15dfe7e0759f#Samples%2fNet4%2fCS%2fWebApi%2fValidationSample%2fReadMe.txt\">Validation Sample project<\/a> which is one of the <a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2012\/08\/26\/asp-net-web-api-and-httpclient-samples.aspx\">ASP.NET Web API samples<\/a>. 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:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/0312.ValidationSampleDebug1_thumb_3433AE0A.png\"><img decoding=\"async\" title=\"ValidationSampleDebug1\" style=\"margin-right: auto;margin-left: auto;float: none\" border=\"0\" alt=\"ValidationSampleDebug1\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/0312.ValidationSampleDebug1_thumb_3433AE0A.png\" width=\"604\" height=\"432\" \/><\/a><\/p>\n<p>Now we hit F11 to step into the next statement and it takes us to the <a href=\"http:\/\/aspnetwebstack.codeplex.com\/SourceControl\/changeset\/view\/7478fdc956ea#src%2fSystem.Net.Http.Formatting%2fFormatting%2fJsonMediaTypeFormatter.cs\">JsonMediaTypeFormatter class<\/a> in ASP.NET Web API:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/7343.ValidationSampleDebug2_thumb_53E287D2.png\"><img decoding=\"async\" title=\"ValidationSampleDebug2\" style=\"margin-right: auto;margin-left: auto;float: none\" border=\"0\" alt=\"ValidationSampleDebug2\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/08\/7343.ValidationSampleDebug2_thumb_53E287D2.png\" width=\"604\" height=\"432\" \/><\/a><\/p>\n<p>If you have issues or questions then please follow up on the <a href=\"http:\/\/aspnetwebstack.codeplex.com\/discussions\/393629\">Symbols for nightly builds available<\/a> discussion thread.<\/p>\n<p>Have fun!<\/p>\n<p>Henrik<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":403,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[31,34,7410],"class_list":["post-2224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-asp-net","tag-asp-net-web-api","tag-codeplex"],"acf":[],"blog_post_summary":"<p>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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/403"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=2224"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=2224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=2224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=2224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}