Search code examples
javascriptdebuggingwkhtmltopdf

Debugging javascript in wkhtmltopdf


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


Solution

  • 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.