class Byebug::PryCommand - byebug-9.0.6 Documentation

# class Byebug::PryCommand

Enter Pry from byebug's prompt

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/pry.rb, line 15
    def self.description
      <<-EOD
        pry

        #{short_description}
      EOD
    end

regexp() click to toggle source

    # File lib/byebug/commands/pry.rb, line 11
    def self.regexp
      /^\s* pry \s*$/x
    end

short_description() click to toggle source

    # File lib/byebug/commands/pry.rb, line 23
    def self.short_description
      'Starts a Pry session'
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/pry.rb, line 27
    def execute
      unless processor.interface.instance_of?(LocalInterface)
        return errmsg(pr('base.errors.only_local'))
      end

      begin
        require 'pry'
      rescue LoadError
        return errmsg(pr('pry.errors.not_installed'))
      end

      Pry.start(context.frame._binding)
    end