Reputation: 7005
I am using some NuGet packages in my projects which have their source publicly available in GitHub (example OrmLite).
How can I configure their repositories as debugger sources in Visual Studio (the same way I could configure ReferenceSource for the .NET Framework etc... like here)?
ReSharper is able to decompile the DLLs, but I am more interested in seeing the comments which are obviously not available this way.
Update:
I know about the pdb
files, but the initial intension was to see the source code when I hit F12. For the .NET Framework that is acheived by simply adding the ReferenceSource as I explained before
Upvotes: 7
Views: 1848
Reputation: 13003
Use the original source-code from GitHub by download the relevant VS code projects and add them to your solution for references instead of using the binaries.
Upvotes: 0
Reputation: 12295
What you are looking for is http://symbolsource.org, which is a platform for hosting open source pdb (debugging) files.
To use it, you'll need to update your Visual Studio instance to pull pdb's from there (http://www.symbolsource.org/Public/Home/VisualStudio):
- Go to Tools -> Options -> Debugger -> General.
- Uncheck “Enable Just My Code (Managed only)”.
- Uncheck “Enable .NET Framework source stepping”. Yes, it is misleading, but if you don't, then Visual Studio will ignore your custom server order (see further on).
- Check “Enable source server support”.
- Uncheck “Require source files to exactly match the original version”
- Go to Tools -> Options -> Debugger -> Symbols.
- Select a folder for the local symbol/source cache.
- Add symbol servers under “Symbol file (.pdb) locations”. Pay attention to the correct order, because some servers may contain symbols for the same binaries: with or without sources. We recommend the following setup:
- http://referencesource.microsoft.com/symbols
- http://srv.symbolsource.org/pdb/Public or the authenticated variant (see above)
- http://srv.symbolsource.org/pdb/MyGet or the authenticated variant (see above)
- (other symbol servers with sources)
- http://msdl.microsoft.com/download/symbols
- (other symbol servers without sources)
Note: Not every nuget package also uploads symbols to SymbolSource (as it requires an additional publishing step). So you might need to contact the developer of the project and ask them to upload it, or if the project is open source, you could do it yourself.
Upvotes: 9