Enable inspecting symbol properties and private fields in the debugger
The debugger currently ignores any properties of objects where the property key is a symbol, and any private fields of class instances. There is Debugger API for dealing with these (though Debugger.Object.getOwnPrivateProperties()
is not documented yet; this would be a good contribution to SpiderMonkey) but the debugger needs to be refactored a bit, because currently we implement printing objects by executing JSON.stringify()
in the debuggee compartment, which of course does not print symbol keys or private properties either. See summarizeObject()
and debuggeeValueToString()
in debugger.js
.
This should be fixed for both 'brief' and 'pretty' printing styles of the print
command, as well as for the keys
command.