O'Reilly logo

Rails Crash Course by Anthony Lewis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required