我在工作时使用bundle exec autotest来运行我的测试规范,但是我也希望能够进出调试器。
我不知道如何让autotest运行,也不知道如何监听debug命令。它每次执行一条调试器语句时都会打印:
***** debugger statement ignored, use -d or --debug option to enable debugging我尝试使用这两个选项调用autotest,即
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)
发布于 2011-07-08 14:44:06
您可以将以下内容添加到项目根目录下的.rspec文件中:
--debug当autotest运行时,它将使用配置文件执行rspec,并在执行任何调试器语句时跳转到调试控制台。
https://stackoverflow.com/questions/6573765
复制相似问题