Skip to content

Instantly share code, notes, and snippets.

@thorbenziemek
Created February 18, 2013 21:13
Show Gist options
  • Select an option

  • Save thorbenziemek/4980798 to your computer and use it in GitHub Desktop.

Select an option

Save thorbenziemek/4980798 to your computer and use it in GitHub Desktop.
debug.js: some JS debugging tools
define({
haltOnModification : function(obj, property) {
Object.defineProperty(obj, property, {
set : function(value) {
debugger;
}
}
},
createArgLogger : function(prefix) {
prefix = prefix || '';
return function() {
console.log(prefix, arguments);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment