Debugging javascript in wkhtmltopdf

El Kopyto picture El Kopyto · Jun 17, 2013 · Viewed 15.7k times · Source

Where I can see the output of javascript debug when wkhtmltopdf runs in debug mode (--debug-javascript)

Answer

CShark picture CShark · Oct 15, 2015

Another (I would say easiest) means of debugging javascript in WKHTMLTOPDF is to download QT Browser, the underlying browser used by WKHTMLTOPDF, and to inspect the javascript execution for your page from within the browser.

You can download it from here

Instructions on debugging javascript in QT here

You can basically debug your JavaScript in QT Browser just as you would in Chrome or Firefox.