GUI rails debugger

Hello,

Somewhat new to rails here. But have used Ruby for years and thus have used ruby-debug before with success. My years of gdb experience were helpful.

I like how rails development is easy to do with Vim and command line. They only time I yearn for a GUI tool is when debugging. I do MS MVC dev at work, and VS is nice for debugging, even if I am not nuts about the rest of it. Anyone know of a nice lite gui debugger I can easily fire up when needed? I don’t want to have to fire up a beast like netbeans either…

~S

Not sure about GUI, but using pry[1] as a debugger is much nicer than ruby-debug IMO.

Don’t forget to install pry-nav [2] so that you get ‘next’, ‘stap’(in) and ‘continue’ for debug navigation!

[1] http://pry.github.com/ [2] https://github.com/nixme/pry-nav

Wow, pry looks great. This is likely all I need. Can’t wait to give it a try tonight.

~S

If you search around the web you’ll find lots of good info on how to better use pry.

For debugging, if you have installed pry-nav, just insert:

require ‘pry-nav’ binding.pry

right where you want the debugger to kick in and you’ll be dropped in a REPL right in the execution context where you called it.

From there you can do whatever you want, from checking values of objects to calling methods and everything else.

Be aware that if you change the value of a variable and continue running, it will use the newly set value, which is f**** good for experimenting. :slight_smile:

You could also try fresh pry-rescue plugin[1].

For debugging, if you have installed pry-nav, just insert:

require 'pry-nav' binding.pry

No need to "require" pry-nav. Just install it and use. Basically, "pry-nav" is a Pry plugin. So it will be required automatically.

[1]: GitHub - ConradIrwin/pry-rescue: Start a pry session whenever something goes wrong.