class DEBUGGER__::ThreadClient

def propertyDescriptor_ name, obj, type, description: nil, subtype: nil

def propertyDescriptor_ name, obj, type, description: nil, subtype: nil
  description = DEBUGGER__.safe_inspect(obj, short: true) if description.nil?
  oid = rand.to_s
  @obj_map[oid] = obj
  prop = {
    name: name,
    value: {
      type: type,
      description: description,
      value: obj,
      objectId: oid
    },
    configurable: true, # TODO: Change these parts because
    enumerable: true    #       they are not necessarily `true`.
  }
  if type == 'object'
    v = prop[:value]
    v.delete :value
    v[:subtype] = subtype if subtype
    v[:className] = (klass = M_CLASS.bind_call(obj)).name || klass.to_s
  end
  prop
end