View complete objects using addProbe

Trying to debug observers and bindings in a SproutCore application? First, call addProbe on any interesting keys:

MyApp.MyView = SC.View.extend({
  init: function () {
    sc_super();
    this.addProbe('layout');
    this.addProbe('frame');
  }
});

Then, open up sproutcore/frameworks/runtime/mixins/observable, and change this:

SC.logChange = function logChange(target, key, value) {
  console.log("CHANGE: %@[%@] => %@".fmt(target, key, target.get(key))) ;
};

To this:

SC.logChange = function logChange(target, key, value) {
  console.log("CHANGE: %@[%@] =>".fmt(target, key), target.get(key));
};

Now, open up the debugging console in your browser. Whenever the specified properties change, your will see a fully-expandable JavaScript object on the console.

Notes