Skip to content Skip to sidebar Skip to footer

How Do I Get Firefox Debugger Watch's Target Element?

I've been trying to add the highlighting feature to the Firefox DevTools debugger, so it will highlight the element instead of only showing [HTMLAnchorElement] or similar. I know i

Solution 1:

You can't really use the highlighter from the Debugger directly yet. We have a bug open (https://bugzilla.mozilla.org/show_bug.cgi?id=653545) to make the highlighter more generally-available to our other tools.

If you have a unique selector, you can use the command line (Shift-F2 to open the Developer Toolbar) to inspect an element via:

inspect unique-selector

We intend to make DOM objects highlightable everywhere in upcoming versions of the Firefox Developer Tools.

edit - This feature has been landed and now works from the Variables View and the Console. Landed in March of 2014 in Firefox 30.

https://hacks.mozilla.org/2014/03/box-model-highlighter-web-console-improvements-firefox-os-hud-more-firefox-developer-tools-episode-30/

Solution 2:

I think you are putting too much efforts in inbuilt debugger,

to debug javascript you must use fireBug its best tool,

This Link is for the addon of firebug, download and install the add-on its hardly 2 MB and then you will enjoy debugging.. :)


Edit: Selector in Debugger

I was searching answer for your specific question, and found out this

Web Console Method

Now here you are able to debug, get element and get selector details too.. (Refer Basic Usage)

You can directly access variables defined on the page:

> $ function(selector, context){
   returnnew jQuery.fn.init(selector,context);
}

please refer the above link for more details..

If native console is not available refer this link, this says,

Under Microsoft Windows you additionally need to start Firefox via the following command to have a native console :

firefox.exe -console

so that will enable firefox to start with console..

Edit: Log To log the element tested>> refere this link in that refer pprint() that will also behave in the same way.

Also Console API there refer console.log

I hope this will help..

Post a Comment for "How Do I Get Firefox Debugger Watch's Target Element?"