Closed Bug 936666 Opened 7 years ago Closed 5 months ago

shortcut to display the variable/property/left-hand-side that the cursor is on

Categories

(DevTools Graveyard :: Scratchpad, enhancement, P3)

x86
macOS
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: fitzgen, Unassigned)

Details

If I have the following code in scratchpad:

  if (window.foobarbaz) {
    // blah blah blah
  }

And put my cursor somewhere in "foobarbaz", then execute $SOME_KEYBOARD_SHORTCUT, it should open the variables view with |window.foobarbaz| populating it.
With this I'm assuming you'd also execute the code? Like if you did:

> (function() {
>   let foo = { bar: 10 };
>   foo.bar;
> })()

In order to open the variables view on foo.bar, you'd have to both execute the code and then do some static analysis on the code to figure out where foo.bar came from.
I'd expect this to throw an error (and show that in the variables view) if you haven't already run the code.
Can we repurpose/share the code that the debugger uses (will use?) for hovering over variables?
Flags: needinfo?(vporof)
(In reply to Nick Fitzgerald [:fitzgen] from comment #3)
> Can we repurpose/share the code that the debugger uses (will use?) for
> hovering over variables?

You bet. As soon as bug 725235 lands that is...
Flags: needinfo?(vporof)
Scratchpad triage, filter on "ghostbusterzzz"
Priority: -- → P3
Severity: normal → enhancement
Product: Firefox → DevTools

Scratchpad was removed in Bug 1519103 (Firefox 72). You can check the alternative in https://wiki.developer.mozilla.org/en-US/docs/Tools/Deprecated_tools#Scratchpad .

The Scratchpad bug list was reviewed and I think this bug can be safely closed.

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → WONTFIX
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.