class Byebug::VarInstanceCommand

Public Instance Methods

execute(*args)
Also aliased as: execute_without_xml
Alias for: execute_with_xml
execute_with_xml(*args) click to toggle source
# File lib/byebug/commands/variables.rb, line 11
def execute_with_xml(*args)
  if Byebug.printer.type == "xml"
    DebuggerXml.logger.puts("match: #{@match}")
    DebuggerXml.logger.puts("THE OBJ: #{get_obj(@match).inspect}")
    print Byebug.printer.print_instance_variables(get_obj(@match))
  else
    execute_without_xml(*args)
  end
end
Also aliased as: execute
execute_without_xml(*args)
Alias for: execute

Private Instance Methods

get_obj(match) click to toggle source
# File lib/byebug/commands/variables.rb, line 26
def get_obj(match)
  if match[1]
    begin
      DebuggerXml.logger.puts("Getting object space")
      ObjectSpace._id2ref(match[1].hex)
    rescue RangeError
      errmsg "Unknown object id : %s" % match[1]
      nil
    end
  else
    bb_warning_eval(match.post_match.empty? ? 'self' : match.post_match)
  end
end