srm
srm

Reputation: 665

Wicked pdf - javascript debugging

I am creating a pdf using the Wicked pdf gem and adding page numbers using the example in the gem documentation.

Is there anyway to use console.log or debugger so I can step through the implementation to gain a better understanding of what the code is doing?

Upvotes: 1

Views: 919

Answers (3)

srm
srm

Reputation: 665

Since the wkhtmltopdf binary is run outside of your Rails application, I was unable to use debugger or console.log or pry the best strategy I could find for debugging was to create elements and populate their text with the var in question.

Upvotes: 1

Alien Life Form
Alien Life Form

Reputation: 581

Have you used Pry, Pry Debugger, or Pry Debug? That's how we generally dig deeper in rails projects (which one you choose depends on the level of control over navigating such as next, step, finish, etc.)

Upvotes: 0

Shadowfool
Shadowfool

Reputation: 1036

You can use chrome's dev tools to step-in, step-out, and step-over functions after your debugger statement.

https://developer.chrome.com/devtools

Upvotes: 0

Related Questions