1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Debugger</title>
<style>
body { font-family: Monospace; }
</style>
<script>
<!--
var debugC = new Array(); // different colors for debug-levels
debugC[0] = 'green';
debugC[1] = 'red';
debugC[2] = 'blue';
debugC[3] = 'purple';
debugC[4] = 'fuchsia';
debugC[5] = 'navi';
function popMsgs() {
if (!this.oDbg)
return;
while (this.oDbg.debugMsgs.length > 0) {
var msg = this.oDbg.debugMsgs[0];
this.oDbg.debugMsgs = this.oDbg.debugMsgs.slice(1,this.oDbg.debugMsgs.length);
var now = new Date();
if (this.oDbg.lvl >= msg.lvl) {
var auto_scroll = false;
if (frames['DebugBottom'].document.body.scrollTop+frames['DebugBottom'].document.body.clientHeight >= frames['DebugBottom'].document.body.scrollHeight)
auto_scroll = true;
frames['DebugBottom'].document.body.innerHTML += "<div class='debugmsgheader'>[" + now.toLocaleString() + "] (level " +msg.lvl+") func: "+msg.caller+"</div><div class='debugmsgbody' style='color:"+debugC[msg.lvl%debugC.length]+";'>" + msg.str + "</div>";
if (auto_scroll)
frames['DebugBottom'].scrollTo(0,frames['DebugBottom'].document.body.scrollHeight);
}
}
}
function init() {
if (!this.oDbg)
return;
frames['DebugTop'].document.getElementById('lvlSelector').selectedIndex = this.oDbg.lvl;
if (this.oDbg.id != '')
document.title = this.oDbg.id + " Debugger";
popMsgs();
}
onload = init;
// onunload = function() { if (this.oDbg && this.oDbg.stop) this.oDbg.stop(); };
//-->
</script>
</head>
<frameset rows="26,*" frameborder=2 framespacing=2 border=2 bordercolor=black>
<frame src="DebugTop.html" name="DebugTop" />
<frame src="DebugBottom.html" name="DebugBottom" />
</frameset>
</html>
|