Skip to content

Debug Javascript - Object Inspection

November 17th, 2016 - Software(1 min)

Many times, you have objects where you may or may not know their content. If you’re running in the browser, life is easy as you can pause the code and inspect the object. at command line is a bit more annoying. In this case, at least for the first run, you can execute something like:

const util = require('util')
console.log(util.inspect(obj, false, null))

where obj is your mystery object.


Share on

A little experiment: