Issues in js and AJAX applications are often specific to a Drupal install or configuration and so are hard to reproduce and troubleshoot without access to that system.

Proposed approach: add debugging calls to all Drupal behaviors

  • Set a debugging level in the jsTools object and add methods for writing debug information to the screen.
  • In behaviors, each action liable to raise errors outputs debugging information, e.g., the content of data returned via AJAX.
  • Provide a jstools.module setting for selecting the debugging level (include this in the js config file returned to browsers).
  • Users with issues turn on debugging and submit the debugging results.

Comments

nedjo’s picture

I've roughed in an approach and applied it to HEAD. To add debugging to a Jstools module:

jsTools.debug('componentname/debug message');

where componentname is the name of the module/behaviour.

I'll work on some documentation!