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

前端 未结 9 1185
醉话见心
醉话见心 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:47

    I use:

    disable-pry
    

    This will keep the program running, but will keep it from continuing to stop execution. This is especially helpful when you are debugging in the console.

提交回复
热议问题