Index: trunk/core/kernel/utility/debugger/debugger.js =================================================================== diff -u -r4880 -r4996 --- trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 4880) +++ trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 4996) @@ -9,7 +9,9 @@ //p_successCallBack: callback function for successful response //p_errorCallBack: callback function for erroneous response //p_pass: string of params to pass to callback functions - if (p_busyReq) return; + if (p_busyReq) { + return; + } var req = DebugReq.getRequest(); if (req != null) { p_busyReq = true; @@ -60,6 +62,7 @@ this.DebuggerDIV = document.getElementById('debug_layer'); this.DebuggerTable = document.getElementById('debug_table'); this.RowCount = 0; + this.busyRequest = false; // window.$Debugger = this; // this should be uncommented in case if debugger variable is not $Debugger window.onscroll = function(ev) { window.$Debugger.Resize(ev); } @@ -74,11 +77,25 @@ $tr.className = 'debug_row_' + (this.RowCount % 2 ? 'odd' : 'even'); $tr.id = 'debug_row_' + this.RowCount; var $td = document.createElement('TD'); - $tr.appendChild($td); $td.className = 'debug_cell'; $td.innerHTML = $html; + $tr.appendChild($td); } +Debugger.prototype.RemoveRow = function($row_index) { + this.DebuggerTable.deleteRow($row_index); + this.RowCount--; +} + +Debugger.prototype.Clear = function() { + if (!this.IsQueried) return false; + + this.IsQueried = false; + while (this.DebuggerTable.rows.length) { + this.RemoveRow(0); + } +} + Debugger.prototype.KeyDown = function($e) { var $KeyCode = this.GetKeyCode($e); if ($KeyCode == 123 || $KeyCode == 27) {// F12 or ESC @@ -124,7 +141,7 @@ } Debugger.prototype.Query = function() { - DebugReq.makeRequest(this.DebugURL, this.busyReq, '', this.successCallback, this.errorCallback, ''); + DebugReq.makeRequest(this.DebugURL, this.busyRequest, '', this.successCallback, this.errorCallback, ''); } Debugger.prototype.successCallback = function(p_req, p_pass) { @@ -146,7 +163,7 @@ Debugger.prototype.Refresh = function() { // progress mether row - document.getElementById('debug_row_1').style.display = 'none'; + this.RemoveRow(0); this.IsQueried = true; this.DebuggerDIV.scrollTop = this.IsFatalError ? 10000000 : 0; this.DebuggerDIV.scrollLeft = 0;