Closed
Bug 1318315
Opened 8 years ago
Closed 7 years ago
Store as global variable is sometimes enabled but doesn't work
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pbro, Unassigned)
References
Details
STR:
- open http://stackoverflow.com/questions/40644602/firefox-49-dev-tools-where-is-store-as-global-variable-stored/40656091
- open the console
- there should be a bunch of CSS warnings
- right click on any of them
- notice that the "store as global variable" item is enabled
- try to use it
==> nothing happens, no temp0 in the prompt, no messages telling users that something went wrong.
In some cases, the menu item is disabled, but in others (like this one), it's not, and this can be confusing.
Comment 1•8 years ago
|
||
Yes, we should be disabling the context menu item for non-grip output. Note that we need to re-do parts of the context menu for the new frontend in Bug 1307239, so let's keep this open and make sure it's fixed after that's done.
Depends on: 1307239
Priority: -- → P3
Comment 2•8 years ago
|
||
I was lead here from the referenced StackOverflow. As the SO author mentions, and as I was trying to do as well, a JSON object cannot be "stored as a global variable".. but should be?
This bug is related, in that the context menu item is enabled but nothing happens (no console var in "tempN", I tried temp0, temp1, etc.).
To repro: devtools > Console > expand an XHR request (e.g., a GET XHR) > choose Response tab > expand JSON, right-click a JSON object > choose "Store as a global variable".
(FWIW, using devtools > Network > Response, I only seem able to copy values of properties in string representation, etc. -- I can't do anything with an entire object, for example. I was searching for a workaround to get [a portion of] the response JSON into the console.)
Firefox 52 / OSX 10.11.6
Comment 3•7 years ago
|
||
(In reply to Richard Michael from comment #2)
> I was lead here from the referenced StackOverflow. As the SO author
> mentions, and as I was trying to do as well, a JSON object cannot be "stored
> as a global variable".. but should be?
>
> This bug is related, in that the context menu item is enabled but nothing
> happens (no console var in "tempN", I tried temp0, temp1, etc.).
>
> To repro: devtools > Console > expand an XHR request (e.g., a GET XHR) >
> choose Response tab > expand JSON, right-click a JSON object > choose "Store
> as a global variable".
>
> (FWIW, using devtools > Network > Response, I only seem able to copy values
> of properties in string representation, etc. -- I can't do anything with an
> entire object, for example. I was searching for a workaround to get [a
> portion of] the response JSON into the console.)
>
>
> Firefox 52 / OSX 10.11.6
Sorry for the delay in responding, and thanks for reporting this issue. Indeed, it appears the menu item for the JSON preview is enabled when it shouldn't be.
We are currently re-doing how the network inspection works so that we can share some UI / code in the network monitor (Bug 1362036), so I will leave a comment over there to make sure this issue doesn't also happen in the new inspection UI.
Comment 4•7 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #1)
> Yes, we should be disabling the context menu item for non-grip output. Note
> that we need to re-do parts of the context menu for the new frontend in Bug
> 1307239, so let's keep this open and make sure it's fixed after that's done.
I can't reproduce the original problem anymore after Bug 1307239, so going to close this one.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•