Closed
Bug 679463
Opened 13 years ago
Closed 4 years ago
[meta] Scratchpad object inspector (PropertyPanel) lacking some basic functionality
Categories
(DevTools :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allen, Unassigned)
References
Details
(Keywords: meta)
The scratch pad inspector is pretty limited. It really should be able to:
1) open a new inspector on the value of a property
2) allow user to set the title on an inspector so they can keep track of the objects
3) show the attribute values of properties
4) see the source code of methods & getters/setters
4) force evaluation of setters
3) delete properties (if they are configurable)
4) add additional properties
Reporter | ||
Comment 1•13 years ago
|
||
Also, a scratchpad menu item to close all inspectors associated with the current scratch pad would be very useful for cleaning up after opening a bunch of inspectors.
Comment 2•13 years ago
|
||
Great suggestions Allen. Thanks for filing this.
I expect we'll open separate bugs for each of these and link back here making this a meta bug.
Updated•13 years ago
|
Summary: Scratchpad inspector lacking some basic functionality → [meta] Scratchpad object inspector lacking some basic functionality
Comment 3•13 years ago
|
||
What do you mean by:
3) show the attribute values of properties ?
JS Object Properties, like enumerable, writeable, configurable etc? Or something else? Not sure how valuable those would be for most users, though it might help to explain why certain properties don't do what they're expecting.
Comment 4•13 years ago
|
||
4) force evaluation of setters
setters or getters? both?
Updated•13 years ago
|
Summary: [meta] Scratchpad object inspector lacking some basic functionality → [meta] Scratchpad object inspector (PropertyPanel) lacking some basic functionality
Reporter | ||
Comment 5•13 years ago
|
||
(In reply to Rob Campbell [:rc] (robcee) from comment #3)
> What do you mean by:
>
> 3) show the attribute values of properties ?
The attributes that are returned by Object.getOwnPropertyDescript. Specifically
enumerable, configurable, writable
>
> JS Object Properties, like enumerable, writeable, configurable etc? Or
> something else? Not sure how valuable those would be for most users, though
> it might help to explain why certain properties don't do what they're
> expecting.
These are now a first class part of the JS language that people can and do set as part of defining objects. When you are trying to understand why your program isn't doing what you expected you need to be able to see the values of these attributes.
Reporter | ||
Comment 6•13 years ago
|
||
(In reply to Rob Campbell [:rc] (robcee) from comment #4)
> 4) force evaluation of setters
>
> setters or getters? both?
I was specifically thinking about invoking the getter as if a [[Get]] was performed for that property.
An inspector UI for setting the value of any property seems like another distinct feature. If that feature is there, then it should probably call the setter when applied to an accessor properties.
Another distinct feature would be modification of property attributes, including the getter and setter functions of an accessor or changing an accessor property to/from a data property.
If a scratchpad for can be openned on an inspector it may less important to support this because Object.defineProperty(this,...) could be evaluated in the scratch pad to modify property definitions.
Comment 7•13 years ago
|
||
(In reply to Allen Wirfs-Brock from comment #5)
> (In reply to Rob Campbell [:rc] (robcee) from comment #3)
> > What do you mean by:
> >
> > 3) show the attribute values of properties ?
>
> The attributes that are returned by Object.getOwnPropertyDescript.
> Specifically
> enumerable, configurable, writable
ok, that's what I thought. I just wanted to make sure. (need to file a separate bug for this)
(In reply to Allen Wirfs-Brock from comment #6)
> (In reply to Rob Campbell [:rc] (robcee) from comment #4)
> > 4) force evaluation of setters
> >
> > setters or getters? both?
>
> I was specifically thinking about invoking the getter as if a [[Get]] was
> performed for that property.
[...]
> If a scratchpad for can be openned on an inspector it may less important to
> support this because Object.defineProperty(this,...) could be evaluated in
> the scratch pad to modify property definitions.
Yeah, that's kind of what I was thinking wrt to the "mini-scratchpad" embedded in inspectors. You kind of gain some superpowers with arbitrary runnable code attached to the inspected object. It makes sense to add that before some of these features to see what additional features we *really* need.
Comment 8•12 years ago
|
||
Bug 808370 landed and now the web console uses the variables view. We now allow users to edit property names and values and they can delete properties. Adding new properties is not yet possible - this is tracked by bug 808371.
Force eval for getters in variables view will be added in bug 820878.
Scratchpad is also switching to variables view, see bug 808369.
Anything else left to tackle? Should we continue to keep this bug open?
Comment 9•12 years ago
|
||
The Scratchpad VariablesView currently is lacking implementation of the handlers for getter/setter editing and property deleting. The other issues were resolved by switching to the VariablesView in bug 808369.
Updated•7 years ago
|
Product: Firefox → DevTools
Comment 10•4 years ago
|
||
Not relevant any more, closing.
Honza
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•