class Byebug::InfoCommand

Show info about different aspects of the debugger.

Constants

Subcommands

Public Class Methods

description() click to toggle source
# File lib/byebug/commands/info.rb, line 196
def description
  prettify <<-EOD
    info[ subcommand]

    Generic command for showing things about the program being debugged.
  EOD
end
names() click to toggle source
# File lib/byebug/commands/info.rb, line 192
def names
  %w(info)
end

Public Instance Methods

execute() click to toggle source
# File lib/byebug/commands/info.rb, line 176
def execute
  return puts(self.class.help) unless @match[1]

  args = @match[1].split(/ +/)
  param = args.shift
  subcmd = Command.find(Subcommands, param)
  return errmsg "Unknown info command #{param}\n" unless subcmd

  if @state.context
    send("info_#{subcmd.name}", *args)
  else
    errmsg "'info #{subcmd.name}' not available without a context.\n"
  end
end
info_file(*args) click to toggle source
# File lib/byebug/commands/info.rb, line 152
    def info_file(*args)
      file = args[0] || @state.file
      unless File.exist?(file)
        return errmsg(pr('info.errors.undefined_file', file: file))
      end

      puts "
        File #{info_file_basic(file)}

        Breakpoint line numbers:
        #{info_file_breakpoints(file)}

        Modification time: #{info_file_mtime(file)}

        Sha1 Signature: #{info_file_sha1(file)}

".gsub(/^ {6}/, '')
    end
regexp() click to toggle source
# File lib/byebug/commands/info.rb, line 172
def regexp
  /^\s* i(?:nfo)? (?:\s+(.+))? \s*$/x
end