How to continue without breakpoints in Byebug

I just found out in the code, that you can stop byebug altogether using:

Byebug.mode = :off

You can't turn it back on, since it won't attach on itself any more, but this is handy, e.g. when just debugging a script that you want to finish running.


You can use continue! or alias c! since byebug 11.0.0.

See this PR https://github.com/deivid-rodriguez/byebug/pull/524

If you are working with Rails, you may wanna reset it back on new request, than you can add a filter:

# application_controller.rb
 before_action do
    if defined?(Byebug) && Byebug.mode == :off && Rails.env.development?
      Byebug.mode = nil
    end
 end

Tags:

Ruby

Byebug