Closed Bug 1058772 Opened 10 years ago Closed 4 years ago

Add 'Use In Command Line' feature to developer tools

Categories

(DevTools :: General, defect)

31 Branch
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: justin.warkentin, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140715214327




Expected results:

The Firefox developer console is missing a really useful feature that Firebug provides. In Firebug you can right click on any object logged to the console and click 'Use in Command Line' to get a reference to it in the web console command line for testing/debugging. Here's a link to their post about it when they added the feature last year:

http://www.softwareishard.com/blog/firebug/new-firebug-feature-use-in-command-line/

I use this feature all the time with Firebug, but I'm trying to switch the the FF dev tools since it's not slow and doesn't chew through my memory like Firebug.

One useful addition could be adding the ability to right click on DOM elements in the console or in the Inspector tab and select 'Use in Command Line' there as well to get a reference to the DOM element.
You can always reference the currently selected element using $0 when opening the console.
Component: Untriaged → Developer Tools
That's very good to know. It's obviously still more useful to have a visible interface for getting the reference, but that will help me in the short term. The most important thing to me though is being able to get references to objects logged in the console. There's at least generally a way to get the DOM elements I want with CSS selectors if nothing else, but there's no way to get a reference to a logged object.
Product: Firefox → DevTools

This feature has been added to the Console panel and it's accessible through the Context menu.

Honza

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.