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
Clone a GitHub repo and then open a project Open Visual Studio 2019 version 16.7 or earlier. On the start window, select Clone or check out code. Enter or type the repository location, and then select Clone. Visual Studio opens the project from the repo.
Open a project locally from a previously cloned GitHub repo Open Visual Studio 2019 version 16.8 or later. On the start window, select Open a project or solution. Visual Studio opens an instance of File Explorer, where you can browse to your solution or project, and then select it to open it.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With