首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何同时运行Ruby调试器和Autotest?

如何同时运行Ruby调试器和Autotest?
EN

Stack Overflow用户
提问于 2011-07-05 00:04:55
回答 1查看 1.1K关注 0票数 3

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

我不知道如何让autotest运行,也不知道如何监听debug命令。它每次执行一条调试器语句时都会打印:

代码语言:javascript
复制
***** debugger statement ignored, use -d or --debug option to enable debugging

我尝试使用这两个选项调用autotest,即

代码语言:javascript
复制
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)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-08 14:44:06

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

代码语言:javascript
复制
--debug

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

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6573765

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档