How to Use: pry-byebug

  1. Add the pry-byebug gem, together with irb, to your Gemfile:
group :development, :test do
  gem 'irb'
  gem 'pry-byebug'
end
  1. Add a .pryrc file to your project containing:
# frozen_string_literal: true

if defined?(PryByebug)
  Pry.commands.alias_command('c', 'continue')
  Pry.commands.alias_command('f', 'finish')
  Pry.commands.alias_command('n', 'next')
  Pry.commands.alias_command('s', 'step')
  Pry.commands.alias_command('w', 'whereami')

  Pry.commands.alias_command('q', '!!!')

  Pry::Commands.command(/^$/, 'repeat last command') do
    _pry_.run_command(Pry.history.to_a.last)
  end
end
  1. Now you can start debugging your code:
require 'pry'
binding.pry