-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm][debugger] Don't show the wasm functions on callstack when debugging managed code #64223
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
Conversation
|
Tagging subscribers to this area: @thaystg Issue DetailsThis PR is what I would like to backport to 6.0. On .net7 my plan is to check if there is dwarf symbols or create something to enable it, the callstack with wasm functions are useful when we want to debug the runtime code. But I would like to merge this version and backport to make callstack have the same behavior that we had on .net5. In the first time that we run the Blazor project we get this: That is why the user was complaining about seeing different informations on first and second execution. Fixes #63466
|
| string url = frame["url"]?.Value<string>(); | ||
| if (!(function_name.StartsWith("wasm-function", StringComparison.Ordinal) || | ||
| url.StartsWith("wasm://wasm/", StringComparison.Ordinal) || function_name == "_mono_wasm_fire_debugger_agent_message")) | ||
| url.StartsWith("wasm://wasm/", StringComparison.Ordinal) || |
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.
the script parsed event has another different condition, should they be the same?
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.
done.
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 convert to a method, so the two places stay in sync? IsAWasmUrl?
|
Will this handle the cases - with, and without debug symbols? Also, it would be useful to have a way to turn these back on. |
In this PR we are ignoring wasm it doesn't matter if it is with or without symbols. And this is what I want to be the behavior on .net6. For .net7 I will consider if it's with symbols and also support debugging something like a "mixed" mode, where we can debug the managed code, and using the DWARF extension debug the native code. This was already tested by me and it works :) |
I meant, does the url follow the same rules (starts with Having a way to not filter these frames out would be useful for those working on the runtime. |
Yes, I'll implement a way to not filter these frames for net7, do you think I should find a solution for it for .net6 also? |
|
@lambdageek , As we have already discussed offline we would like to have a way to enable and disable showing the wasm functions on callstack, do you think this is important for .net6? |
We talked offline. We can't think of a scenario where seeing the mangled wasm function names (which are not the C function symbols) is useful either for end users or for runtime developers. (even if linking native libraries, or using AOT) So it seems ok to disable completely. |
| switch (url) | ||
| { | ||
| case var _ when url == "": | ||
| case var _ when url.StartsWith("wasm://", StringComparison.Ordinal): |
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.
is there a reason we're usingurl.StartsWith("wasm://" here and url.StartsWith("wasm://wasm/", in SendCallStack?
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.
Done.
…gging managed code (dotnet#64223) * Show the callstack as it's shown on net5. * Addressing @lewing and @radical comments. * addressing @lewing comment.
This PR is what I would like to backport to 6.0.
On .net7 my plan is to check if there is dwarf symbols or create something to enable it, the callstack with wasm functions are useful when we want to debug the runtime code.
But I would like to merge this version and backport to make callstack have the same behavior that we had on .net5.
In the first time that we run the Blazor project we get this:
"http://localhost:5174/_framework/dotnet.wasm"in the URL field of the original callstack that came from the browser.After stop and running again we get this:
"wasm://wasm/00945abe"That is why the user was complaining about seeing different callstack on first and second execution.
Fixes #63466