This post aims to describe, how we can access local package feed and download symbols to debug package. This post also explains how we have to step Visual studio to access package feed and symbol server. To see how you can create packages that can be debugged in Visual Studio 2017, please refer my last past "Create Nuget Package with source and symbol to debug in VS 2017"
Setting up Visual Studio 2017
1. Open solution for the project in Visual Studio 2017.
2. Click on Tools Options from top menu items in VS.
3. Go to NuGet Package Manager Package Source.
4. Click on the icon on the top right icons. Name it YourFeed (You can give a name as per your convenience) and put source http://yourservername:81/nuget/YourPackage/. Then click on update button.
5. Debugging --> Symbols and click on the icon to add new symbol server. Please make sure existing Microsoft Symbol Server should be unchecked.
6. Put symbol source path(http://yourservername:81/symbols/YourPackage) for newly created options and put any local folder path for “Cache Symbol in this Directory” option.
7. Now go to Debugging --> General options in the same window.
8. Check/Uncheck highlighted options same as below image.
9. Click on OK button.
10. Now while adding package from NuGet Package Manager. The select source with the name of your new feed as in this sample we are using YourFeed and you will be able to view all packages hosted on local NuGet feed.
11. Manage your package same as other NuGet packages we do in VS
Debugging of package in visual studio 2017
1. Put debugger in your code as we normally do.
2. Run project in debug mode.
3. The first time it may take time as it will load symbols from the server.
4. A popup with a message to load symbol may open. Don’t cancel that popup, let it load the symbols.
5. It will stop at break point put by the developer. Now press F11 to step in.
6. It will step in the code but if it ask location of source file to debug then guide it to source of file in NuGet packages location as below path ( Bold name will be name of your user on your system)