-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 modify values. #49557
Conversation
will these Suppot on iOS when merged? |
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.
Just did a quick scan. Will follow up in a bit.
Co-authored-by: Larry Ewing <lewing@microsoft.com>
This will be supported on wasm debugger. :) |
…the new value type is incompatible.
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsFor simple types like: boolean, integer, long and char. TODO: When we try to set a variable value of an attribute in an object it calls Runtime.callFunctionOn and we don't support it yet.
|
We do support it - https://github.com/dotnet/runtime/blob/main/src/mono/wasm/debugger/BrowserDebugProxy/DevToolsHelper.cs#L207 . But maybe it is missing something that you need? |
I saw it but I didn't investigate why it was not working, it tries to run a function that receives the object as parameter and tries to run something like this: |
See https://github.com/dotnet/runtime/blob/main/src/mono/wasm/runtime/library_mono.js#L1227-L1249 We construct a proxy object, so you would need a proxy setter there that does the actual value setting for managed code. |
@radical, done! |
* upstream/main: (568 commits) [wasm] Set __DistroRid on Windows to browser-wasm (dotnet#50842) [wasm] Fix order of include paths, to have the obj dir first (dotnet#50303) [wasm] Fix debug build of AOT cross compiler (dotnet#50418) Fix outdated comment (dotnet#50834) [wasm][tests] Add properties to allow passing args to xharness (dotnet#50678) Vectorized common String.Split() paths (dotnet#38001) Fix binplacing symbol files. (dotnet#50819) Move type check to after the null ref branch in out marshalling of blittable classes. (dotnet#50735) Remove extraneous CMake version requirement. (dotnet#50805) [wasm] Remove unncessary condition for EMSDK (dotnet#50810) Add loop alignment stats to JitLogCsv (dotnet#50624) Resolve ILLink warnings in System.Diagnostics.DiagnosticSource (dotnet#50265) Avoid unnecessary closures/delegates in Process (dotnet#50496) Fix for field layout verification across version bubble boundary (dotnet#50364) JIT: Enable CSE for VectorX.Create (dotnet#50644) [main] Update dependencies from mono/linker (dotnet#50779) [mono] More domain cleanup (dotnet#50771) Race condition in Mock reference tracker runtime with GC. (dotnet#50804) Remove IAssemblyName (and various fusion remnants) (dotnet#50755) Disable failing test for GCStress. (dotnet#50828) ...
src/mono/wasm/debugger/DebuggerTestSuite/SetVariableValueTests.cs
Outdated
Show resolved
Hide resolved
@thaystg thank you for making all the changes, and adding the tests! |
What happens if you try to set
|
On Js even if I insert a value like this: |
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.
Thanks for the changes. Just a few more comments, we are almost done!
Also, I ran all the tests locally, and they pass:
Failed: 0, Passed: 491, Skipped: 0, Total: 491
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.
Thanks for your patience! LGTM 👍
For simple types like: boolean, integer, long and char.
Tests implemented.
Fixes #42327.