Chapter 13. Debugging
I’ve been told that not all developers are perfect like you and me. We
never make mistakes in our code, but sometimes other developers make
mistakes that we have to clean up. When that happens, the debugging features built into
Rails come in handy. This chapter covers those built-in debugging features, starting with
debug helper method, which makes it easier to see the values of
variables in your application’s views.
We spent some time looking at the Rails log in previous chapters. In this chapter, you’ll also see how to add your own messages to that log. Finally, using the debugger gem, you can step inside your application as it’s running to track down really tough bugs.
The debug Helper
Rails includes a view helper method ...