-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Use correct object context for expanding accessors in the prototype chain #108036
Comments
You can use the setting |
@connor4312 I've tried it. it changes nothing. |
Make sure you're using |
@connor4312 I can see no difference with |
Can you please grab some logs with that setting applied and using /jsDebugLogs |
sent to connor@xbox.com. stripped some sensitive data. |
Thanks for the logs. Looks like we are trying to expand the getters, but accessing them fails, e.g. trying to call
I (assume) the reason is that we set |
Thank you for the swift reaction. However I wonder, since the issue was reclassified into a bug-report...
|
The setter still shows up, e.g.:
That is why this option was introduced 🙂 The previous debugger always evaluated+expanded getters on objects. Chrome's debugger doesn't do so for the reason you mentioned -- though generally considered bad practice, getters can have side-effects -- and I replicated that behavior in the new debugger for the same reason, with an option to use the old behavio. |
So, is there something I could do to hide it? Or change the way how it appears in the tree? Something like Can you perhaps do something about it, since you are already there? Or should I make a separate issue? Thank you. |
@Spown currently these are not easily customizable. I prefer to keep the Trying to repro this, I'm not sure there's actually a bug -- using the getting started on Mongoose's docs, I can see the same un-expanded properties that you're seeing, but trying to access them in the repl gives the same error
So far as far I can see we're working as designed. |
Well, for me finding the right property/var first is much more important than to know how it came to be. If I need to know how it is defined - I can look into it specifically. But traversal is something that I always need. And having the list in alphabetical order is a must. Now it is only ordered alphabetically, but represented with words starting with "s" and "g" mixed all over the place. It wasn't like that before and now suddenly its a new norm without an option to opt out. |
Fixed in the linked commit. Getters/settings now appear as We don't have the capability, as a debugger, to display quite as pretty a display, but I agree that preserving lexographic order is preferable. Available in the next nightly |
Verified that getters/setters are now rendered with |
Since the couple last versions, when debugging JS and inspecting the variables (both in side menu and by hovering over code) the setter/getter methods are prefixed with "set/get". I get why it is useful, however the implementation messes with one's workflow. Personally I expect variable/property list to be alphabetical, so I focus on the first letters first, which speeds up it's traversal. But now it's a mess.
Can you add an icon or color code them or move "get/set" word behind the name, like:
set foo: ⨍ ()
->foo: set ⨍ ()
or something of this sort, instead of using text?
Or is there a config option already for controlling this?
Thank you.
The text was updated successfully, but these errors were encountered: