title: How can I troubleshoot javascript or http errors in wkhtmltopdf?
body: <p>For a while now, I have used wkhtmltopdf for on-the-fly generation of pdf documents, and generally it is far ahead of the pack (compared with other tools available in php).</p>
  
  <p>However, it is a HUGE PAIN to do even the most basic debugging of this process.
  With your regular browser, one might <code>alert(var);</code> or <code>console.log(var);</code> and discover that "var" is <code>undefined</code>. Again, you can easily see a <code>404</code> or <code>500</code> http error somewhere in the browser console.</p>
  
  <p>Take for instance this:</p>
  
  <pre><code>wkhtmltopdf.exe http://localhost/mypage.html C:/temp/myfile.pdf
  </code></pre>
  
  <p>The pdf file does get created but is imperfect because certain aspects dependent on javscript or AJAX are missing.</p>
  
  <p>With wkhtmltopdf, how best can I investigate these kinds of errors, if they exist in <code>mypage.html</code>?</p>