I see that I now need to pas -d or --debug with the rspec command line tool to use ruby-debug. What about with Cucumber? RSpec 2.0 Core overwrites Kernel#debugger that ruby-debug uses.
My work-around is to just comment out the debugger method defined in kernel_extensions.rb in RSpec-core. This doesn''t feel like an ideal solution. On Jun 19, 1:27?pm, Brian Cardarella <bcardare... at gmail.com> wrote:> I see that I now need to pas -d or --debug with the rspec command line > tool to use ruby-debug. What about with Cucumber? RSpec 2.0 Core > overwrites Kernel#debugger that ruby-debug uses. > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
On Jun 19, 2010, at 5:24 PM, Brian Cardarella wrote:> On Jun 19, 1:27 pm, Brian Cardarella <bcardare... at gmail.com> wrote: >> I see that I now need to pas -d or --debug with the rspec command line >> tool to use ruby-debug. What about with Cucumber? RSpec 2.0 Core >> overwrites Kernel#debugger that ruby-debug uses. > My work-around is to just comment out the debugger method defined in > kernel_extensions.rb in RSpec-core. This doesn''t feel like an ideal > solution.What are you experiencing and what are you expecting?
> What are you experiencing and what are you expecting?If you use rspec in cucumber, cucumber doesn''t support --debug as an option, so you can''t use debuggers in cucumber + rspec. Given RSpec 2.0''s api, the expected behavior is declaring --debug + debugger drops you into a debugger, and the experience is an unsupported option error from cucumber. However, in my opinion, the expected behavior after declaring a debugger is to be dropped into a debug session without an extra option. Once you''ve played with it a little, then I could imagine wanting to turn ''em off for a sec before removing them entirely. So I''d rather have --no-debug myself. -- Posted via http://www.ruby-forum.com/.
On Jul 1, 2010, at 10:48 PM, Woody Peterson <lists at ruby-forum.com> wrote:>> What are you experiencing and what are you expecting? > > If you use rspec in cucumber, cucumber doesn''t support --debug as an > option, so you can''t use debuggers in cucumber + rspec. > > Given RSpec 2.0''s api, the expected behavior is declaring --debug + > debugger drops you into a debugger, and the experience is an > unsupported > option error from cucumber. > > However, in my opinion, the expected behavior after declaring a > debugger > is to be dropped into a debug session without an extra option. Once > you''ve played with it a little, then I could imagine wanting to turn > ''em > off for a sec before removing them entirely. So I''d rather have > --no-debug myself. > --I imagine the --debug flag is to avoid any errant debugger calls from flaking out production.> _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users