Muccu has build-in support for clientside tracing. All you have to du, is to deliver a casllback function to the application:

muccu.trace(function(arg){
  if(arg.error!==undefined)
    log.write(arg.error.message);
});

The callback is called both imediatly before th XmlHttp call, and just after recieving the result from the Muccu-server. This feature is priceless help for debugging the Ajax application. It is possible to watch all parts of the datastructures.

Tip
It is possible to use the trace-callback as a centralized place for controlling a wait-cursor:

muccu.trace(function(arg){
  if(arg.method!==undefined)
    $('waitimage').show();
  else
    $('waitimage').hide();
});


You can check for the existence of the method property, and show/hide accordingly.

Last edited Apr 4, 2011 at 8:34 AM by TheIMan, version 1