Uh oh!
There was an error while loading. Please reload this page.
[wasm] debug with modularized runtime(s) - #61848
Conversation
ghost
commented
Nov 19, 2021
Tagging subscribers to this area: @thaystg Issue DetailsIt doesn't work yet
|
ghost
commented
Nov 19, 2021
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsIt doesn't work yet
|
Uh oh!
There was an error while loading. Please reload this page.
4b82de2 to
f6b1a7aCompareeab63aa to
a780dc9Compare
kg
left a comment
There was a problem hiding this comment.
Looks good, needs debugger expert approval though
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
thaystg
left a comment
There was a problem hiding this comment.
Looks good to me.
Debugger tests passing. Debug a Blazor app also working.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pavelsavara
commented
Nov 25, 2021
@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
MONOorINTERNALwould 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.getDotnetRuntimemethod, which takesruntimeId, essentially index of the runtime on the page. It returns theDotNetPublicAPIobject 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=0to 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_logandmono_wasm_trace_loggerout of C macro into typescriptRuntimeBuildInfo: { ProductVersion, Configuration }intoDotNetPublicAPI