In an embedded GraalJS setup (Java host + Context), debugging JavaScript objects backed by ProxyObject is difficult.
Observed behavior:
- A ProxyObject is accessible from JavaScript.
- Its properties can be read normally in code through property access (
obj.field).
- But in Chrome DevTools and in VS Code debugging, the debugger variables view does not show those members properly.
Expected behavior:
- When inspecting a ProxyObject in the debugger, its members should be visible in the variables/object tree, similarly to how they are accessible from JavaScript code.
Possible implementation direction:
- The debugger could query
getMemberKeys() when inspecting a ProxyObject.
- If supported, writable members could perhaps also use
putMember().
Why this matters:
- In embedded Java + GraalJS applications, ProxyObject is a common bridge between Java and JavaScript.
- Runtime access works, but debugging remains much harder than normal execution.
Environment:
Minimal context:
- Embedded Java application using
org.graalvm.polyglot.Context
- Java object exposed to JS through
org.graalvm.polyglot.proxy.ProxyObject
In an embedded GraalJS setup (Java host + Context), debugging JavaScript objects backed by ProxyObject is difficult.
Observed behavior:
obj.field).Expected behavior:
Possible implementation direction:
getMemberKeys()when inspecting a ProxyObject.putMember().Why this matters:
Environment:
Minimal context:
org.graalvm.polyglot.Contextorg.graalvm.polyglot.proxy.ProxyObject