Reputation: 665
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
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
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
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