[rspec-users] debuggin cucmber script in ruby

Zach Dennis zach.dennis at gmail.com
Mon Apr 6 20:10:34 EDT 2009

On Mon, Apr 6, 2009 at 12:21 PM, Ben Mabey <ben at benmabey.com> wrote:
> Anil Gollaa wrote:
>> hi,
>> Thanks for the information,
>> When i run cucumber testfile.feature, I was able to halt execution at
>> breakpoint, but when i type 'n'. it is getting in to
>> /lib/cucumber/ast/step_invocation.rb:33 and some other lib files of
>> cucumber.
>> I just want to debug line by line of the script, instead of getting in to
>> cucumber files.
>> please help me in this regard
> Sorry, but I don't know of anything that will automatically allow you to
> skip over framework code.. Although, that would be very cool.  My best
> suggestion would be to set multiple breakpoints and hit "c" to continue to
> the next one so you can skip through all of Cucumber's code.

I will sometimes set a global variable to help me flag when to debug,
if the code in question gets executed multiple times. e.g.

   $c = true if my_condition_is_met

And then...

  debugger if $c

> -Ben
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Zach Dennis

More information about the rspec-users mailing list