From: Jason Etheridge Date: Mon, 23 May 2011 18:03:33 +0000 (-0400) Subject: debugging aid, take the "thread trace" for a given page and make it stand out more X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a7d34c5befa20b9a6baddef04d3dbb3411e121e5;p=evergreen%2Fpines.git debugging aid, take the "thread trace" for a given page and make it stand out more Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/server/skin/custom.js.example b/Open-ILS/xul/staff_client/server/skin/custom.js.example index 2b00bb266c..d7b36b6aab 100644 --- a/Open-ILS/xul/staff_client/server/skin/custom.js.example +++ b/Open-ILS/xul/staff_client/server/skin/custom.js.example @@ -10,6 +10,7 @@ // Debugging aids. _dump_level = 4 enables all dump statements _dump_level = 4; + var _dump_prefix = '0'; try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); @@ -20,10 +21,28 @@ try { var temp = prefs.getIntPref('oils.unique_id') + 1; prefs.setIntPref('oils.unique_id',temp); _dump_prefix = String( temp ); + switch( temp % 5 ) { + case 0: _dump_prefix = '!! ' + _dump_prefix; break; + case 1: _dump_prefix = '@@ ' + _dump_prefix; break; + case 2: _dump_prefix = '## ' + _dump_prefix; break; + case 3: _dump_prefix = '$$ ' + _dump_prefix; break; + case 4: default: _dump_prefix = '%% ' + _dump_prefix; break; + } } - dump(' _dump_prefix ' + _dump_prefix + ' = ' + location.href + '\n'); + dump(' >>>>>>>>>>>>>>>>>>>>>>>>>>>> ' + _dump_prefix + ' = ' + location.href + '\n'); } catch(E) { dump('Error in custom.js trying to set oils.unique_id\n'); } - +function dump_xulG(msg) { + dump('[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\n'); + dump(msg +'\n'); + if (xulG) { + for (var i in xulG) { + dump('xulG['+i+'] = '+xulG[i]+'\n'); + } + } else { + dump('no xulG\n'); + } + dump(']]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n'); +}