-
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] debug with modularized runtime(s) #61848
[wasm] debug with modularized runtime(s) #61848
Conversation
Tagging subscribers to this area: @thaystg Issue DetailsIt doesn't work yet
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsIt doesn't work yet
|
4b82de2
to
f6b1a7a
Compare
eab63aa
to
a780dc9
Compare
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.
Looks good, needs debugger expert approval though
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.
Looks good to me.
Debugger tests passing. Debug a Blazor app also working.
|
@lewing we would appreciate your feedback on this PR, proxy code in particular. If you have any comments I will fix it in future PRs. Will merge this now. |
Context
After we modularize the runtime, the APIs like
MONO
orINTERNAL
would not be on globalThis anymore.Also, there would be possibility to instantiate multiple runtimes in the same web page.
I don't think that multiple runtimes on same page nor multiple debuggers running on same page in parallel are very likely scenarios. This PR is just neat way how to allow that possibility in the future, while solving the isolation that ES6 will bring.
Changes
globalThis.getDotnetRuntime
method, which takesruntimeId
, essentially index of the runtime on the page. It returns theDotNetPublicAPI
object of the instance{MONO, BINDING, Module, RuntimeId, RuntimeBuildInfo }
.getDotnetRuntime()
in unit tests, with runtimeId is zero as there is only one runtime in tests.&runtimeId=0
to the initial URL which opens DebuggerProxy, so that MonoProxy could be created for specific runtime on the page.mono_wasm_add_dbg_command_received
,mono_wasm_debugger_log
andmono_wasm_trace_logger
out of C macro into typescriptRuntimeBuildInfo: { ProductVersion, Configuration }
intoDotNetPublicAPI