class DEBUGGER__::ThreadClient

def propertyDescriptor name, obj

def propertyDescriptor name, obj
  case obj
  when Array
    propertyDescriptor_ name, obj, 'object', subtype: 'array'
  when Hash
    propertyDescriptor_ name, obj, 'object', subtype: 'map'
  when String
    propertyDescriptor_ name, obj, 'string', description: obj
  when TrueClass, FalseClass
    propertyDescriptor_ name, obj, 'boolean'
  when Symbol
    propertyDescriptor_ name, obj, 'symbol'
  when Integer, Float
    propertyDescriptor_ name, obj, 'number'
  when Exception
    bt = ''
    if log = obj.backtrace_locations
      log.each do |loc|
        break if loc.path == __FILE__
        bt += "    #{loc}\n"
      end
    end
    propertyDescriptor_ name, obj, 'object', description: "#{obj.inspect}\n#{bt}", subtype: 'error'
  else
    propertyDescriptor_ name, obj, 'object'
  end
end