This episode will show you how to debug a rails app using the "debugger" gem: set a breakpoint, inspect variables and change the executed code at runtime.
@dominik it's not really abandoned, it's just not being looked after as it should be. It's a huge pain to install on Ruby 1.9.3 due to gems not released to rubygems.org! Personally I think it was about time it was forked considering 1.8.7's death is preeminent and 1.9.3 has been GA for over 6 months.
Hi, I'm using pry and pry_debug in my rails application, have no problem at all with "rails console",but I can't figure out how to step when I include binding.pry in my controller. any hints please.
I switched to RubyMine from VIM a while ago b/c the remote degugger is such a pain to inject every time using VIM/TEXTMATE/WHATEVER. Visual debugging is REALLY nice :) I'm not sure what technique they use, but debugging has worked on Ruby 1.9.3 for a while with RubyMine.
I know it is rather controversial but I found RubyMine IDE to be a great way to debug rails apps. It has very cool UI for debugger with breakpoints, visual stack and so forth.
debugger don't work properly with ruby 2.0. Try this https://github.com/deivid-rodriguez/byebug. It's almost the same. But it don't work with ruby 1.9.x. For ruby 1.9.3 works debugger fine.
Nice-to-know episode! Any idea, why ruby-debug19 was abandoned?
—Dominik
@dominik it's not really abandoned, it's just not being looked after as it should be. It's a huge pain to install on Ruby 1.9.3 due to gems not released to rubygems.org! Personally I think it was about time it was forked considering 1.8.7's death is preeminent and 1.9.3 has been GA for over 6 months.
That qualifies for »abandoned«, in my opinion ;-)
I had have also trouble to install
ruby-debug19
on some Debian machines with Ruby 1.9.2 using either RVM or rbenv.debugger
works like a charm :-)Any tips for using debugger or pry with Pow?
you can use pry-remote: https://github.com/Mon-Ouie/pry-remote
Hi, I'm using pry and pry_debug in my rails application, have no problem at all with "rails console",but I can't figure out how to step when I include binding.pry in my controller. any hints please.
Thanks!
I found out about
pry-nav
adding this to Gemfile:
gem 'pry'
gem 'pry-rails'
gem 'pry-remote'
gem 'pry-nav'
As always, good information. I use pry on a daily basis in both Rails and POR apps. Great tool for effective debugging.
Timezone is not easy as it looks. Timezone-related code must be carefully written.
I tried to find an easy way to set Rails
config.time_zone
to local but failed.Now I use an initializer:
I switched to RubyMine from VIM a while ago b/c the remote degugger is such a pain to inject every time using VIM/TEXTMATE/WHATEVER. Visual debugging is REALLY nice :) I'm not sure what technique they use, but debugging has worked on Ruby 1.9.3 for a while with RubyMine.
THere is a a way to get ruby-debug working on ruby 1.9.3
put this in your gemfile
I found this at Stackoverflow
I know it is rather controversial but I found RubyMine IDE to be a great way to debug rails apps. It has very cool UI for debugger with breakpoints, visual stack and so forth.
If I can get some attention or upvotes, you'll help stamp out ruby-debug19 from the Rails Gemfile template https://github.com/rails/rails/pull/5835
debugger don't work properly with ruby 2.0. Try this https://github.com/deivid-rodriguez/byebug. It's almost the same. But it don't work with ruby 1.9.x. For ruby 1.9.3 works debugger fine.