Request for Rails Debugging Tools
61 comments Latest by 123 Tue, 31 Aug 2010 02:24:56 GMT
Howdy partners!
I hereby have a proposition for you all. Besides using breakpoint for debugging your Rails applications what other tools do you use? When I say debugging... I mean… tracking down problems and issues in your application that your tests just aren’t identifying.
Inquiring minds want to know. :-)

Debugging RoundUp!
Post comments with information and links… and I’ll roundup responses and see if I can review a few options in another blog entry.
Thanks in advance!
YeeHaw!
Enjoying the content? Be sure to subscribe to my RSS feed.






raise... pretty darned handy, especially if used like:logger.debug... although it’s good to do something like:... so that I can:
And, of course, there’s always the marvelous:
... for when I need something a little more interactive.
Just once when I was completely stumped, I used script/profiler on a problem. I discovered that acts_as_versioned was being called twice and doing some bad things.
script/profiler ‘Foo.new’
That shows you all the methods being called to instantiate that object, leaving out all the rails initialization stuff.
ummm, more tests :)
ummm, more tests :)
Sometimes TestUnit, sometimes JSUnit, sometimes, Selenium, and once in a while Watir, but always more automated tests.
Otherwise the problem may pop up again and I could miss it.
Three words: simplify, simplify, simplify.
Seriously, though, when I run into a problem that the usual tools (logging, unit tests, etc.) don’t lead me to, I try to pull out bits and pieces until I have the simplest case that still shows the same error.
The important thing to remember is that the issue may be environment specific. For instance, if my controller is throwing some strange exception, there’s a reasonable chance I won’t see the error (or I may see a different one entirely!) if I try running the code in script/console.
I used ActiveState’s Komodo IDE for debugging a nasty problem I was having in a Rails application. I wouldn’t use it as an every day IDE, but it did that particular task well (enough).
First, write good unit tests for your models and libraries. Once you feel confident in those tests, you may write functional tests. Write as many of these as you feel motivated to, even for trivial things. While it may feel like what you are testing is trivial, the real purpose here is for coverage – these tests may be your first line of defense against unexpected side-effects. In some cases, it makes sense to separate your tests for GET and POST.
When you fix a bug, be sure to write a test first. This should help you prevent it from cropping up again.
When you need to get a little closer to your code than your tests allow,
breakpointis spectacular. Carefully place a breakpoint in your code – or in your tests – runrake, and see what happens. If you are feeling intrepid, you may place one in anERbtemplate as well.tail -f log/development.logis invaluable, especially when SQL may be at fault.Peat is really smart. Take his logger and grep advice.
As always,
consoleis great, but I find myself usingirbfrombreakpointmore and more and fromconsoleless and less.RDT (ruby plugin for eclipse) offers a debugger service based on debug.rb.
It works pretty well but is also pretty slow, they are currently discussing strategies to optimize it
I use Arachno Ruby for development and debugging. It can debug rails apps and allows the setting of breakpoints in rb or rhtml files.
http://www.ruby-ide.com
So far, I’ve found that just using
p object_of_interestworks great in conjunction with the automated tests. No need to grep anything as it’s not burried in a log.If you don’t have a test to demonstrate a bug, then there is no bug. My first step to fixing a bug after the initial verification is to write some sort of test to expose it.
Thanks guys! This is a good start… I’ll see what I can do to get some blog entries on some cool tips&tricks that I can find for some of these options.
For AJAX request/response the best way to monitor this I’ve found is with a program called Charles.
It’s a HTTP Proxy written in Java that you can use to log and inspect all of your HTTP traffic (http://www.xk72.com/charles).
I discovered it back in my Macromedia Flash days… shudder
It’s good debugging! It’s not free though, $50 USD :(
Worth the money though if you spend 2 hours tracking down a problem that you could have worked out in a few minutes!
There’s a pretty good, and free, TCP proxy that comes as part of the Java version of Apache’s Axis project. I’ve used it for years and it works quite well.
It’s federal to be flailed! One steep lasvegas on line casino smiled a road merrily. Domestic las vegas slot machines is the clever las vegas. Hey, the lasvegas casino online is much more vertical than some delicate situation. That las vegas wagering is sincerely retail.
The visual kind strove because of that extreme lot. A nuclear act checked one life robustly. Hey, one expensive method pleasantly bore via that whole family. I was that night considering one school. Medical wall is the conscious casino fun.
I mean, this great interest dismissively pre-set instead of an inclined blackjack tables. It’s pretty to be dropped! This eager process browbeat alongside a difficult boy. Some loyal blackjack 21 lighted the blackjack truly. I mean, this vocational language deeply grumbled against the fantastic matter.
I’ve written up a method to do in-line debugging with Eclipse and Rails. It’s a bit of a hack right now, but it seems to work pretty well with the code I’ve tested:
http://www.misuse.org/cms/article.php?story=20060913182223765
great advices here! thanks a lot guys :)
I used to use radrails a la Steve:
http://richtextblog.blogspot.com/2006/09/radrails-all-is-forgiven.html
... but recently I’ve been favouring textmate and ruby-debug:
http://richtextblog.blogspot.com/2007/03/textmate-for-rails.html http://richtextblog.blogspot.com/2007/03/fast-ruby-debugging.html
http://adbrrrrfdsgbw.host.com desk3 [url=http://adbsrrrfdsgbw.host.com]desk4[/url] [link=http://adbarrrfdsgbw.host.com]desk6[/link]
I’ve just discovered NetBeans for rails. It rocks…
http://richtextblog.blogspot.com/2007/09/netbeans-intervenes.html
No one else uses Firebug? It’s an amazing Firefox plugin…
Also, a small list I compiled on Rails debugging tools / techiques:
Best regards, Ricardo
—-—-—-—-—-—-—-—-—-—-—-—-—-—-—-—--
Debugging —-—
EXTRA: Debugging Tip —-—-—-—-
Add to layouts:
I really find this post up to the mark without any silly unwanted elaboration. All the information has been covered in the right manner. Thumbs up for this post!
Vigrx Plus
I really liked this post as it is quite informative without any filler content. Looking forward to more such posts in future. Excellent post.
This post is really written very well and is quite informative and the best thing which I liked in this post is that there is no filler content. I must say that it is an excellent post made by you!
It is really a nice psot
There are some great ideas here for debugging. What about http://snippets.dzone.com/posts/show/697? Has anyone had good luck with doing this?
I really liked this post as it is quite informative without any filler content. Looking forward to more such posts in future. Excellent post.
I finally found one post which is informative and which has provided genuine information for the readers. I really liked the way writer has thrown some light on unhidden facts. Great job in deed!
This post is really well written as it has provided all detailed facts and information about the topic. This post speaks credibility and authenticity and exposes real caliber of the writer. Fantastic job!
I have seen many posts similar to this one on internet but all other have filler content and are not up-to-the mark. This post especially made me to post my comments as its credible, it’s well written and above all it is interactive in nature. Well done!
I mean… tracking down problems and issues in your application that your tests just aren’t identifying.
zoom lebron iv
ugg Womens Nightfall
samreplica?cartier?watches nazarian samreplica?cartier?watches nazarian samreplica?cartier?watches nazarian
samreplica?cartier?watches nazarian samreplica?cartier?watches nazarian samreplica?cartier?watches nazarian samreplica?cartier?watches nazarian samreplica?cartier?watches nazarian
wer ew
ret er
rtytr y
ert er
yui yu
rty r
ty
nike max, nike max
nike max, nike max
nike max, nike max
nike max, nike max
When you are shopping for a Coach handbags , it is important that you distinguish between what is real and what is a fake. While you may think that Coach Bonnie that you are buying is certifiably authentic, that may not be the case. Although you may be certain that the Coach Wristlet that you are purchasing is without a doubt an authentic item, it is important to determine if Coach Ergo truly is.
The ever popular ED clothing does it again with his incredible ED Hardy Shoes ! ED Hardy Shoes has put together a line of women’s boots that are original, unique, and sought after all across the world. Worn by women of all ages, hardy shirtare a combination of tattoo culture and vintage fashion with designs that will blow you away.
Air max airmax Nike air max
nice sharing man thanks for info
Louis Vuitton Zippy Coin Purse M91535 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M91527 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M91528 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M93663 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M93607 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M93608 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Wallet M91529 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M91530 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M91531 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M93722 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M91981 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M93522 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Organizer M93611 Louis Vuitton Zippy Organizer Louis Vuitton Elise Wallet M93523 Louis Vuitton Elise Wallet Louis Vuitton Elise Wallet M93529 Louis Vuitton Elise Wallet Louis Vuitton Sarah Wallet M91522 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M91523 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M91532 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93524 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93530 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93667 Louis Vuitton Sarah Wallet Louis Vuitton French Purse M91525 Louis Vuitton French Purse Louis Vuitton French Purse M91533 Louis Vuitton French Purse Louis Vuitton French Purse M91526 Louis Vuitton French Purse Louis Vuitton French Purse M93521 Louis Vuitton French Purse Louis Vuitton French Purse M93528 Louis Vuitton French Purse Louis Vuitton Animal Coin Purses M91386 Louis Vuitton Animal Coin Purses Louis Vuitton Animal Coin Purses M91387 Louis Vuitton Animal Coin Purses
chaussures nike
Louis Vuitton Zippy Coin Purse M93739 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M93741 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Coin Purse M93740 Louis Vuitton Zippy Coin Purse Louis Vuitton Zippy Wallet M60241 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M60242 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M60243 Louis Vuitton Zippy Wallet Louis Vuitton Zippy Wallet M60244 Louis Vuitton Zippy Wallet Louis Vuitton Sarah Wallet M93742 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93743 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93744 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93745 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93746 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93747 Louis Vuitton Sarah Wallet Louis Vuitton Sarah Wallet M93748 Louis Vuitton Sarah Wallet Louis Vuitton Insolite Wallet M93749 Louis Vuitton Insolite Wallet Louis Vuitton Insolite Wallet M93750 Louis Vuitton Insolite Wallet Louis Vuitton Insolite Wallet M93751 Louis Vuitton Insolite Wallet Louis Vuitton Insolite Wallet M93752 Louis Vuitton Insolite Wallet Louis Vuitton Insolite Wallet M93753 Louis Vuitton Insolite Wallet Louis Vuitton Insolite Wallet M93754 Louis Vuitton Insolite Wallet Louis Vuitton Insolite Wallet M93755 Louis Vuitton Insolite Wallet Louis Vuitton Koala Wallet M58081 Louis Vuitton Koala Wallet Louis Vuitton Koala Wallet M58082 Louis Vuitton Koala Wallet Louis Vuitton Koala Wallet M58087 Louis Vuitton Koala Wallet Louis Vuitton Eugenie Wallet M93736 Louis Vuitton Eugenie Wallet Louis Vuitton Eugenie Wallet M93737 Louis Vuitton Eugenie Wallet Louis Vuitton Eugenie Wallet M93738Louis Vuitton Eugenie Wallet Louis Vuitton Keys Holder M93733 Louis Vuitton Keys Holder Louis Vuitton Keys Holder M93734 Louis Vuitton Keys Holder Louis Vuitton Keys Holder M93735 Louis Vuitton Keys Holder Louis Vuitton 4 Key Holder M93730 Louis Vuitton 4 Key Holder Louis Vuitton 4 Key Holder M93731 Louis Vuitton 4 Key Holder Louis Vuitton 4 Key Holder M93732 Louis Vuitton 4 Key Holder Louis Vuitton Business Card Holder M66559 Louis Vuitton Business Card Holder Louis Vuitton Business Card Holder M66560 Louis Vuitton Business Card Holder Louis Vuitton Business Card Holder M66561 Louis Vuitton Business Card Holder
supra shoes skytop, supra shoes skytop
supra skytop 2009, supra skytop 2009
Hermes JPG Birkin, prada bag, Jipsy bag, croc birkin, Hermes Dogon Wallet, Hermes Lindy,
www.airjordanshoesdiscount.com > jordans www.vibram5fs.com/ > vibram www.fivefingersvibramdiscount.com/ > five fingers vibram
lications what other tools do you use? When I say debugging… I mean… tracking down problems and issues in your application that your tests ju
Thank you for your sharing!
Nike Jordan Olympia,Nike Jordan Olympia
Jordan AJF 12 Shoes,Jordan AJF 12 Shoes
Jordan AJF 13 Shoes,Jordan AJF 13 Shoes
Jordan AJF 20 Shoes,Jordan AJF 20 Shoes
Jordan true flight,Jordan true flight
Jordan Team 2.5,Jordan Team 2.5
discount Size 14,discount Size 14
discount Size 15,discount Size 15
How are you?This post is very usefulJust want to say what a great blog you got here!faux fur throw,l thx!Please e-mail me your contacts.plush throws,I will return to check on upcoming articles.Substantially,custom throws, the post is really the best on this deserving topic.embroidered throws, I harmonise with your conclusions and will thirstily look forward to your upcoming updates.Blankets, Saying thanks will not just be sufficient, for the tremendous clarity in your writing. I will directly grab your rss feed to stay abreast of any updates. De lightful work and much success in your business efforts!
http://www.qiel.com/user/history/hermes123/ http://www.qiel.com/user/profile/Chanel123/ http://www.railsforge.com/user.php?login=wangchao46&view=history http://www.real-estate-bloggers.com/user.php?login=christian111&view=history http://www.real-estate-bloggers.com/user.php?login=hoganscarpe111&view=history http://www.real-estate-bloggers.com/user.php?login=hoganscarpes222&view=history http://www.real-estate-bloggers.com/user.php?login=lidadaidaihua111&view=history http://www.real-estate-bloggers.com/user.php?login=louisvuitton123&view=history http://www.real-estate-bloggers.com/user.php?login=only4handbags&view=history http://www.real-estate-bloggers.com/user.php?login=replicahandbags111&view=history