I have a failing scenario in cucumber, and I'd like to debug my rails controller using ruby-debug. But if I add 'debugger' to the point where I want to break, it doesn't stop.
I tried adding require of ruby-debug and rubygems to the features/support/env.rb but then it says to me that it can't load ruby-debug, although ruby-debug is on the gem list and I can load it in irb.
So... what should I do to get it working?
Thanks!
i had this same problem today, and i got it figured out. here's my blog post explaining the two different ways I got it working:
http://lostechies.com/derickbailey/2011/06/29/debugging-cucumber-tests-with-ruby-debug/
you may just need to add require "ruby-debug"
to your features/support/env.rb file to get it working.
Try adding breakpoint
instead of debugger
.
That should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With