Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created March 28, 2015 00:08
Show Gist options
  • Save jasonLaster/2bad4dc4262a22b94c44 to your computer and use it in GitHub Desktop.
Save jasonLaster/2bad4dc4262a22b94c44 to your computer and use it in GitHub Desktop.
monitoring the inspector backend class
var dispatch = InspectorBackendClass.Connection.prototype.dispatch;
InspectorBackendClass.Connection.prototype.dispatch = function() {
if (arguments && arguments.length > 0) {
var message = arguments[0];
var object = message ? JSON.parse(message) : {};
console.log.apply(console,['events', object]);
}
dispatch.apply(this, arguments);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment