Skip to content

Instantly share code, notes, and snippets.

@davewalk
Last active August 29, 2015 14:05
Show Gist options
  • Save davewalk/59a438325fca5214f3de to your computer and use it in GitHub Desktop.
Save davewalk/59a438325fca5214f3de to your computer and use it in GitHub Desktop.
Dumb JS object debugging in NodeJS
var util = require('util'),
fs =require('fs');
// Print a nested object to the console for full inspection
console.log(util.inspect(data, showHidden=false, depth=16, colorize=true));
// Print a thing to a file
fs.writeFile('debug.txt', aThing, function(err) {
if (err) console.log('Write error for some reason!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment