-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm][debugger] Implement support to symbolOptions from dap. #79284
Conversation
Tagging subscribers to this area: @thaystg Issue DetailsReceive the symbolOptions settings from VS and use it do load debug information. related to: microsoft/vscode-js-debug#1467
|
|
||
string keyTrim = key.TrimEnd('*'); | ||
|
||
if (document.StartsWith(keyTrim, StringComparison.OrdinalIgnoreCase)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious - does this need to be culture sensitive? And case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know :)
Co-authored-by: Larry Ewing <lewing@microsoft.com> Co-authored-by: Ankit Jain <radical@gmail.com>
src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj
Outdated
Show resolved
Hide resolved
[ConditionalTheory(nameof(RunningOnChrome))] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
public async Task SteppingIntoLibrarySymbolsLoadedFromSymbolServer(bool justMyCode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also:
- a test that first hits the bp, and steps with no symbol server set. Then in the same test, sets the symbol server, and steps again
- A separate test that (a) sets a symbol server; (b) steps; (c) adds another symbol server; (d) steps again
- A separate test that (a) adds multiple symbol servers; (b) steps; (c) removes one of the symbol servers; (d) steps again
Co-authored-by: Ankit Jain <radical@gmail.com>
{ | ||
List<AssemblyInfo> ret = new List<AssemblyInfo> (); | ||
if (symbolStore == null) | ||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return Enumerable.Empty<AssemblyInfo>
instead. It will save on the unnecessary allocation which will have a non-zero sized backing array.
{ | ||
if (string.IsNullOrEmpty(urlServer)) | ||
continue; | ||
symbolStore = new HttpSymbolStore(_tracer, symbolStore, new Uri($"{urlServer}/"), null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should handle exceptions, and continue to try the remaining urls.
And a corresponding test with [ goodUrl1, badUrl, goodUrl2]
.
internal void UpdatePdbInformationFromSymbolServer(Stream streamToReadFrom) | ||
{ | ||
var pdbStream = new MemoryStream(); | ||
streamToReadFrom.Position = 0; | ||
streamToReadFrom.CopyTo(pdbStream); | ||
pdbStream.Position = 0; | ||
pdbMetadataReader = MetadataReaderProvider.FromPortablePdbStream(pdbStream).GetMetadataReader(); | ||
if (pdbMetadataReader == null) | ||
return; | ||
ProcessSourceLink(); | ||
foreach (var method in this.Methods) | ||
{ | ||
method.Value.pdbMetadataReader = pdbMetadataReader; | ||
method.Value.UpdatePdbInformation(method.Value.methodDefHandle); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be merged with LoadPDBFromSymbolServer
.
Changing when the symbols from symbol server is loaded because it takes a long time to load, as there are a lot of assemblies loaded not found on symbol servers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the suggested tests, LGTM! Thank you for patiently working with the feedback! And for pursuing the whole process to make this happen!!
Removing timeout change as @radical has split it into 2 files Fixing test behavior, when justMyCode is disabled but the symbols are not loaded from symbol server.
/azp run runtime-wasm-non-libtests |
Azure Pipelines successfully started running 1 pipeline(s). |
else if (event_kind != EventKind.UserBreak) | ||
context.IsSteppingThroughMethod = true; | ||
if (event_kind == EventKind.Step) | ||
context.IsSkippingHiddenMethod = true; | ||
if (await SkipMethod(isSkippable: true, shouldBeSkipped: true, StepKind.Out)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for the named params!
- Don't call `UpdateSymbolStore` from `DebugStore..ctor` because that gets called multiple times in `LoadStore`, but only once instance gets used. - Use an isolated symbol cache path per test
# Conflicts: # src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs
…#79284) * Draft to implement support to symbolOptions from dap. * removing debugger.launch * Adding tests and fix compilation error * Adding test case. * Fix test cases, and implement support to PDBChecksum used on nuget.org to get symbols. * merge * Fixing tests. * Tests are timing out. * Apply suggestions from code review Co-authored-by: Larry Ewing <lewing@microsoft.com> Co-authored-by: Ankit Jain <radical@gmail.com> * adressing @radical comments. * Addressing @radical comment. * Addressing @radical comments. * Apply suggestions from code review Co-authored-by: Ankit Jain <radical@gmail.com> * Addressing @radical comments. * Addressing @radical comments Changing when the symbols from symbol server is loaded because it takes a long time to load, as there are a lot of assemblies loaded not found on symbol servers. * use MicrosoftCodeAnalysisCSharpVersion for scripting package. * Adding more tests as asked by @radical Removing timeout change as @radical has split it into 2 files Fixing test behavior, when justMyCode is disabled but the symbols are not loaded from symbol server. * [wasm] some cleanup - Don't call `UpdateSymbolStore` from `DebugStore..ctor` because that gets called multiple times in `LoadStore`, but only once instance gets used. - Use an isolated symbol cache path per test * remove debug spew * Addressing radical comment. Co-authored-by: Larry Ewing <lewing@microsoft.com> Co-authored-by: Ankit Jain <radical@gmail.com>
Receive the symbolOptions settings from VS and use it do load debug information.
related to: microsoft/vscode-js-debug#1467