runtime
runtime copied to clipboard
[wasm-ep] Use DOTNET_DiagnosticPorts to configure Diagnostic Server
Parse it the same way that the C code does:
<uri>[,<connect|listen>][,<suspend|nosuspend>]
- uri should be a websocket uri
- listen is not supported as it doesn't make sense with a WebSocket
- connect is the default if omitted
- suspend is the default if omitted
Additionally, move mono_wasm_diagnostics_init to later in the
startup flow. This gives Blazor a chance to set
DOTNET_DiagnosticPorts from their onRuntimeInitialized callback.
An unfortunate problem here is that blazor and non-blazor startup need to call diagnostics init from different places because of how environment variables are populated. So we try to init diagnostics twice and set a flag.
Fixes https://github.com/dotnet/runtime/issues/73011
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Issue Details
Parse it the same way that the C code does:
<uri>[,<connect|listen>][,<suspend|nosuspend>]
- uri should be a websocket uri
- listen is not supported as it doesn't make sense with a WebSocket
- connect is the default if omitted
- suspend is the default if omitted
Additionally, move mono_wasm_diagnostics_init to later in the
startup flow. This gives Blazor a chance to set
DOTNET_DiagnosticPorts from their onRuntimeInitialized callback.
Fixes https://github.com/dotnet/runtime/issues/73011
| Author: | lambdageek |
|---|---|
| Assignees: | lambdageek |
| Labels: |
|
| Milestone: | - |
Please also update src\mono\sample\wasm\browser-eventpipe\main.js to use the env variable
Ideally also replacing BINDING.bind_static_method with [JSExport]
or is @maraf already looking at that ?
Ideally also replacing
BINDING.bind_static_methodwith[JSExport]or is @maraf Marek Fisera FTE already looking at that ?
Rewrite to JSExport is here https://github.com/dotnet/runtime/pull/73367
@pavelsavara @maraf I'd like to get https://github.com/dotnet/runtime/pull/73305 in before this one. I can't really test what's here until that other PR goes on.
@maraf I think I want to delete of browser-mt-eventpipe. It was just a proof of concept. browser-eventpipe is good (and i'll update it to use DOTNET_DiagnosticPorts) and the new browser-threads in #73305 is good. Both of them should be able to run in CI, I think. browser-mt-eventpipe isn't really needed.
/azp run runtime-wasm
Azure Pipelines successfully started running 1 pipeline(s).
/azp run runtime-wasm
Azure Pipelines successfully started running 1 pipeline(s).
Azure Pipelines successfully started running 1 pipeline(s).
/azp run runtime-wasm
Azure Pipelines successfully started running 1 pipeline(s).