3

When I enter the name of an object in the command line of the Web Console of Firefox, it shows up as [object Object].

I can then click on the object with the mouse to inspect it. Is there a way to do this using the keyboard, or to directly dump the object in expanded form?

Tomas
  • 4,845
  • 1
  • 30
  • 38

2 Answers2

4

Sure, use console.dir(object).

I am surprised that it is not mentioned in https://developer.mozilla.org/docs/Tools/Web_Console.

Edited (2015-05-24):

Currently, there'a a entry for console.dir() on docs:

https://developer.mozilla.org/docs/Web/API/console/dir

felipsmartins
  • 11,616
  • 3
  • 40
  • 50
Mike Ratcliffe
  • 811
  • 5
  • 10
0

There is now something better than this. Try:

inspect(object)
LondonRob
  • 53,478
  • 30
  • 110
  • 152