class DEBUGGER__::ThreadClient

def preview_ value, hash, overflow

def preview_ value, hash, overflow
  # The reason for not using "map" method is to prevent the object overriding it from causing bugs.
  # https://github.com/ruby/debug/issues/781
  props = []
  hash.each{|k, v|
    pd = propertyDescriptor k, v
    props << {
      name: pd[:name],
      type: pd[:value][:type],
      value: pd[:value][:description]
    }
  }
  {
    type: value[:type],
    subtype: value[:subtype],
    description: value[:description],
    overflow: overflow,
    properties: props
  }
end