Debug Javascript - Object Inspection
1 min read

Debug Javascript - Object Inspection

Debug Javascript - Object Inspection

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.

HTH,