Skip to content

Instantly share code, notes, and snippets.

@CurtisHumphrey
Created April 24, 2015 12:51
Show Gist options
  • Select an option

  • Save CurtisHumphrey/f89ba3fc9b849e1ab896 to your computer and use it in GitHub Desktop.

Select an option

Save CurtisHumphrey/f89ba3fc9b849e1ab896 to your computer and use it in GitHub Desktop.
Add debug output to firebase get and sets
# Debuging path access
old_get = fb.core.Repo.prototype.addEventCallbackForQuery
fb.core.Repo.prototype.addEventCallbackForQuery = (query, eventRegistration) ->
console.log "get " + query.path.pieces_.join '/'
old_get.call @, query, eventRegistration
old_set = fb.core.Repo.prototype.setWithPriority
fb.core.Repo.prototype.setWithPriority = (path, newVal, newPriority, onComplete) ->
console.log "set " + path.pieces_.join '/'
old_set.call @, path, newVal, newPriority, onComplete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment