Rails 5 Test Prescriptions 第10章 troubleshooting and debug

本章讲了如何定位❌,和排除bug. 

Pry  

a Ruby console. 可以替代irb。增加了一些配合的gems,是一个杰出的debugger工具。

使用:在测试和开发环境使用:

gem "pry-rails"  取代irb
gem "pry-byebug"  step through the code
gem "pry-stack_explorer"   #go up and down the stack trace

gem "pry-rescue"

后面还没有看。

另外rspec bisect ,bisect是一个隔离失败测试的系列方法,没有看。


猜你喜欢

转载自www.cnblogs.com/chentianwei/p/9135896.html