I really love the Chrome console because it autocompletes all the object methods for me.
But it only shows one at a time and I have to press TAB to step to the next one.
Is there a way to show a list of all the autocompletion object methods?
I really love the Chrome console because it autocompletes all the object methods for me.
But it only shows one at a time and I have to press TAB to step to the next one.
Is there a way to show a list of all the autocompletion object methods?
Share Improve this question asked Oct 1, 2010 at 22:07 never_had_a_namenever_had_a_name 93.2k105 gold badges277 silver badges392 bronze badges 1- Related: View list of all JavaScript variables in Google Chrome Console – Marcel Korpel Commented Oct 1, 2010 at 22:24
5 Answers
Reset to default 11console.dir( someObject );
You could loop though and print them. Here's an example for window
:
for(var i in window) if(window.hasOwnProperty(i)) console.log(i);
I noticed in recent versions (10+) of Chrome, you can just type the object name and it will build you a tree of the object:
someObject;
you can also use console.log(someObject);
Ben McCormack's way works as well, you just need to be Paused on breakpoint (in Chrome DevTools > Sources )
Use Object.getPrototypeOf
Object.getPrototypeOf(objectHere)
// or
console.dir(Object.getPrototypeOf(objectHere))