如何在自动测试的同时运行Ruby调试器?

如何在自动测试的同时运行Ruby调试器?,ruby,debugging,rspec,Ruby,Debugging,Rspec,我使用bundle exec autotest在工作时运行我的测试规范,但是我也希望能够在调试器中输入和输出 不过,我不知道如何运行自动测试并侦听调试命令。每次通过调试器语句时,它都会打印: ***** debugger statement ignored, use -d or --debug option to enable debugging 我试着用这两个选项调用自动测试,即 bundle exec autotest --debugger # => just ignores the

我使用
bundle exec autotest
在工作时运行我的测试规范,但是我也希望能够在调试器中输入和输出

不过,我不知道如何运行自动测试并侦听调试命令。每次通过调试器语句时,它都会打印:

***** debugger statement ignored, use -d or --debug option to enable debugging
我试着用这两个选项调用自动测试,即

bundle exec autotest --debugger
# => just ignores the debugger

bundle exec autotest -d
# => complains that -d is an invalid option

bundle exec autotest --debug
# => still doesn't trigger but advises 
#    "debugger statement ignored, use -d or --debug option to enable debugging"
使用自动测试时如何调用调试器

目前,我总是不得不返回到手动调用
rspec spec-d


(我的设置是Rails 3)

您可以将以下内容添加到项目根目录中的.rspec文件中:

--debug

当自动测试运行时,它将使用配置文件执行rspec,并在执行任何调试器语句时跳转到调试控制台。

您是否尝试过bundle exec autotest--debug?最后没有额外的“ger”吗?我以前没有(现在已编辑),但在尝试它时,它不起作用。很高兴他们告诉你--debug不起作用,尝试使用--debug。拔毛时间:PIt的
选项无效
很遗憾:(