I use bundle exec autotest
to run my test specs as I work however I'd also like to be able to drop in and out of the debugger.
I can't figure out how to get autotest running and also listen for debug commands though. Every time it goes through a debugger statement it prints:
***** debugger statement ignored, use -d or --debug option to enable debugging
I've tried calling autotest with both of those options i.e.
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 bu开发者_StackOverflowt advises
# "debugger statement ignored, use -d or --debug option to enable debugging"
How can I call the debugger while using autotest?
At the moment I always have to drop back to manually calling rspec spec -d
(My setup is Rails 3)
You can add the following to your .rspec file in the root of your project:
--debug
When autotest runs, it will execute rspec using the config file, and will jump into the debug console whenever any debugger statements are executed.
精彩评论