Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby-debug and cucumber

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!

like image 382
Thiago Avatar asked Feb 04 '11 13:02

Thiago


2 Answers

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.

like image 97
Derick Bailey Avatar answered Oct 05 '22 01:10

Derick Bailey


Try adding breakpoint instead of debugger.

That should work

like image 45
changelog Avatar answered Oct 05 '22 01:10

changelog