-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Debuggers: Add "copy path" to the context menu in the inspector #19580
Comments
No description provided. |
This is a good opportunity for a PR |
Fixes #19580; added copy property path action to debug viewlet
"Copy Path" is a bit weird, maybe "Copy Name"? |
"Copy Name" usually means copying a particular property name, whereаs I need the whole chain from root (global, window, etc) and ending with selected property/variable. Actually "Copy Name" wouldn't harm to have as well. There is also a scenario when I go into prototype of an object (or even several levels of prototypes deep) and I need the path without But this may wait for another day. Right now it would be nice to have just the own path. Thank you. |
Yeah, up for ideas, "Copy Name" is not ideal either. I am just correlating "Copy Path" with file paths typically. |
Well, people at Lodash call it path sometimes. Mongoose does the same as well |
Also copying path means capturing array indexes as well. In case of multidimensional arrays it would mean only indexes - |
some ideas: |
"Copy expression path" and "Copy evaluation path" work for me |
Variants: |
I don't think "evaluation" is a good word for this. You probably use it internally, to get values to dispaly in the inspector. But from the consumption perspective it has nothing to do with eval. Or do I see it wrong? |
Maybe "Copy path as/for expression"? |
Any user that uses the REPL (aka debug console) knows what evaluation means because she is using it all the time... |
"Copy path as expression" sounds strange because a user has selected a variable not a path. So my variants from above tried to address this by introducing the "as" but they left out the "variable". |
I'm not saying the user doesn't know what eval means - I'm saying the user associates evaluation with either evaling in console or through
If I would see such a menu item - I would think it does value stringification or something like that. |
After a discussion with a team we settled on "Copy as Expression" |
Currently there is a "Add to Watch" for all items in the variable inspector and "Copy/Set Value" for the primitive fields. Please add a "Copy Path" for all items. Right now the only way to do it is through a watch:
Which is not only tiresome, but also creates a useless watch.
Thank you.
The text was updated successfully, but these errors were encountered: