How do I step out of a loop with Ruby Pry?

前端 未结 9 1136
醉话见心
醉话见心 2020-12-22 15:11

I\'m using Pry with my Rails application. I set binding.pry inside a loop in my model to try and debug a problem. For example:

(1..100).each do          


        
9条回答
  •  一生所求
    2020-12-22 15:30

    Use

    disable-pry
    

    To renable, add this to your controller

    ENV['DISABLE_PRY'] = nil
    

提交回复
热议问题