红宝石调试和黄瓜 [英] ruby-debug and cucumber
问题描述
我在黄瓜有一个失败的情况,我想调试我的rails控制器使用ruby-debug。但是如果我添加调试器到我想要打破的点,它不停止。
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.
我试过添加require ruby-debug和rubygems到features / support / env.rb,但是它告诉我,它不能加载ruby-debug,虽然ruby-debug是在gem列表,我可以加载它在irb。
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?
谢谢!
推荐答案
我今天也有同样的问题, 。这里是我的博客文章,解释了我工作的两种不同的方式:
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/
您可能只需要在你的features / support / env.rb文件中添加 requireruby-debug
。
you may just need to add require "ruby-debug"
to your features/support/env.rb file to get it working.
这篇关于红宝石调试和黄瓜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!