javascriptfirefoxfirefox-developer-tools

Show values instead of getter/setter functions in Firefox DevTools variable view


When inspecting a JavaScript object, that uses getter/setter functions for properties (defined with Object.defineProperties) in the Firefox DevTools variables view, it shows the defined getter and setter functions for this particular property:

enter image description here

Is there any way to show the actual content instead of the functions in this view?

Edit: as nils commented, viewing the actual content means technically invoking the getter.


Solution

  • Since Firefox 65 this is possible to invoke a getter via a button next to it within the logged object.

    Button to invoke a getter

    This was implemented in bug 820878 resp. issue 6140 on GitHub.

    In versions prior to Firefox 65 you could output the getter's return value by simply calling it directly via the command line.