Skip to content

Instantly share code, notes, and snippets.

@mkwiatkowski
Created February 17, 2012 13:53
Show Gist options
  • Save mkwiatkowski/1853550 to your computer and use it in GitHub Desktop.
Save mkwiatkowski/1853550 to your computer and use it in GitHub Desktop.
WebPage debugging function for phantomjs
debugPage = (page) =>
console.log(page.evaluate -> window.location.toString())
fs = require('fs')
fs.write('output.html', page.content, 'w')
page.render('output.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment