Add symbol-server and debugging integration - #4198
Open
pieroviano wants to merge 3 commits into
Open
pieroviano wants to merge 3 commits into
pieroviano wants to merge 3 commits into
Conversation
ILSpy only found PDBs next to an assembly or embedded in it. A SymbolLocator now resolves PDBs along an _NT_SYMBOL_PATH-style path (local stores, flat directories, HTTP SymSrv/SSQP servers with a local cache), verifying every candidate against the CodeView id before use. A loopback-only SymbolServerHost serves the opened assemblies' PE files, their own PDBs, or portable PDBs generated on demand with embedded decompiled sources, so a debugger can step into code that ships without symbols. OriginalSourceProvider reads embedded sources or downloads Source Link documents, checking them against the PDB document hash.
Exposes the ILSpyX symbol support in the app: a Symbols options page drives the symbol path, cache and auto-download, and starts/stops the loopback symbol server; assemblies get "Load Symbols from Symbol Server" and members "View Original Source" (embedded or Source Link). The symbol store now takes plain modules so hosts without an AssemblyList can serve symbols too.
Lets the CLI find PDBs on symbol servers when decompiling, and run the same loopback symbol server as the UI for scripted debugging sessions.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue(s) this covers
None; feature proposal.
Problem
ILSpy only finds PDBs next to an assembly or embedded in it, cannot fetch them from symbol servers, cannot show the original sources a PDB points to, and offers nothing to a debugger that wants symbols for code shipped without them.
Solution
SymbolLocatorresolves PDBs along an_NT_SYMBOL_PATH-style path (flat dirs, symbol stores, HTTP SymSrv/SSQP servers with a local cache). Every candidate is verified against the CodeView id before use;SymbolChecksumheader sent for symbols.nuget.org.SymbolServerHostserves the open assemblies' PE files, their own PDBs, or portable PDBs generated on demand with embedded decompiled sources, so a debugger can step into code without symbols.OriginalSourceProviderreturns embedded sources or downloads Source Link documents, checked against the PDB document hash.--symbol-path,--symbol-cache,--serve-symbols <port>..pd_downloads.SymbolServerHost(request parsing, key normalization) and theLoadedAssemblyhook that downloads symbols while an explicitly opened assembly loads (auto-download is off by default).ILSpy.Tests/Symbols,ICSharpCode.ILSpyCmd.Tests/SymbolOptionTests; fullILSpy.TestsandICSharpCode.ILSpyCmd.Testspass locally on .NET 11 RC1, Windows)