Debugging Rails - Request for tips, tricks and hacks


I am wondering if you guys would be kind enough to point me to resources
that you find are valuable to your debugging efforts, or would be to
beginning to become structured about efficient debugging.

Relating to that, I would like to automagically drop to the debugger
before the first failing spec, does anyone know of a gem / hack that
provides that or could point me to what I could use to hack that


Hopefully someone else will come in with more input on debugging as that
is required sometimes. But I don’t find myself using a debugger very
often. I write tests, then the simplest piece of code to make them work
and I’m running the tests (even for a large app) continuously using
autorun, so I find that if I get a regression, it’s in the last 2-3 git
commits which really helps figuring things out.

There are definitely conditions where a debugger can be helpful, but it
is worth pointing out that it’s a bit of a “development smell” if you
need one very often. It usually suggests too tight coupling between
classes and/or a lack of unit level specs/tests.

Best Wishes,

On Fri, May 27, 2011 at 7:52 PM, Peter B. [email protected] wrote:

lack of unit level specs/tests.

Thanks for your input Peter, I definitely agree about the benefits of
:slight_smile: The issue is that we are in the process of migrating from Rails 2.3.5
3.0.7 and are faced with 2k+ failing tests.
We know exactly the commit that caused it :wink: But we need to fix debug /
the app within those parameters.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs