[rspec-users] debuggin cucmber script in ruby

Matt Wynne matt at mattwynne.net
Wed Apr 8 16:51:29 EDT 2009


On 7 Apr 2009, at 17:23, Scott Taylor wrote:

>
> On Apr 7, 2009, at 11:54 AM, Ben Mabey wrote:
>
>>
>> On Apr 7, 2009, at 8:30 AM, aidy lewis wrote:
>>
>>> On 07/04/2009, Zach Dennis <zach.dennis at gmail.com> wrote:
>>>> On Mon, Apr 6, 2009 at 12:21 PM, Ben Mabey <ben at benmabey.com>  
>>>> wrote:
>>>
>>>>> 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
>>>
>>> Some useful tips, but I feel the ruby-debug tutorials that exist are
>>> lacking. Would it be fitting for me to add a Cucumber and ruby-debug
>>> page on the Wiki?
>>>
>>> Aidy
>>
>>
>> That would be great!  Thanks for offering.
>
> I've been meaning to do a ruby-debug screencast for quite some time.
>
> Although it won't be specific to cucumber, I'll post it on the wiki  
> when I get around to it.
>
> Scott

This is really good. It's short and sweet, and makes you realise  
there's really not much to it at all:
http://railscasts.com/episodes/54-debugging-with-ruby-debug

Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com



More information about the rspec-users mailing list