Skip to content

Commit

Permalink
refresh debug info more frequently
Browse files Browse the repository at this point in the history
  • Loading branch information
e9gille committed Mar 8, 2017
1 parent a115be8 commit 0905ec7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
<script src=node_modules/jquery/dist/jquery.min.js ></script>
<script src=lib/jquery-ui.min.js ></script>
<script src=lib/jquery.bind-first-0.2.3.min.js ></script>
<script src=lib/jquery.ba-throttle-debounce.min.js ></script>
<script src=node_modules/codemirror/lib/codemirror.js ></script>
<script src=node_modules/codemirror/addon/dialog/dialog.js ></script>
<script src=node_modules/codemirror/addon/search/search.js ></script>
Expand Down
9 changes: 9 additions & 0 deletions lib/jquery.ba-throttle-debounce.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
4 changes: 2 additions & 2 deletions src/ed.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ D.Ed.prototype={
cm.replaceRange(s,{line:l,ch:0},{line:l,ch:cm.getLine(l).length},'D')
},
LN:function(){D.prf.lineNums.toggle()},
TC:function(){D.send('StepInto',{win:this.id});D.send('GetSIStack',{})},
TC:function(){D.send('StepInto',{win:this.id});D.ide.getSIS()},
AC:function(cm){ //align comments
if(cm.getOption('readOnly'))return
var ed=this,ll=cm.lastLine(),o=cm.listSelections() //o:original selections
Expand All @@ -186,7 +186,7 @@ D.Ed.prototype={
cm.setSelections(o)
},
ER:function(cm){
if(this.tc){D.send('RunCurrentLine',{win:this.id});D.send('GetSIStack',{});return}
if(this.tc){D.send('RunCurrentLine',{win:this.id});D.ide.getSIS();return}
if(D.prf.autoCloseBlocks()){
var u=cm.getCursor(),l=u.line,s=cm.getLine(l),m
var re=/^(\s*):(class|disposable|for|if|interface|namespace|property|repeat|section|select|trap|while|with)\b([^\{]*)$/i
Expand Down
5 changes: 4 additions & 1 deletion src/ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ D.IDE=function(){'use strict'
var w=ide.wins[x.win];if(w){w.closePopup&&w.closePopup();w.vt.clear();w.container&&w.container.close()}
delete ide.wins[x.win];ide.focusMRUWin()
ide.WSEwidth=ide.wsew;ide.DBGwidth=ide.dbgw
ide.getSIS()
},
OpenWindow:function(ee){
if(!ee['debugger']&&D.el&&process.env.RIDE_EDITOR){
Expand Down Expand Up @@ -87,7 +88,7 @@ D.IDE=function(){'use strict'
p.addChild({type:'component',componentName:'win',componentState:{id:w},title:ee.name},ind)
ide.WSEwidth=ide.wsew;ide.DBGwidth=ide.dbgw
if(tc){
D.send('GetSIStack',{})
ide.getSIS()
ide.wins[0].scrollCursorIntoView()
}else ide.wins[0].cm.scrollTo(si.left,si.top)
},
Expand Down Expand Up @@ -333,6 +334,8 @@ D.IDE.prototype={
var ide=this;if(ide.dead)return
ide.dead=1;ide.connected=0;ide.dom.className+=' disconnected';for(var k in ide.wins)ide.wins[k].die()
},
getThreads:$.debounce(100,function(){D.ide.dbg&&D.send('GetThreads',{})}),
getSIS:$.debounce(100,function(){D.ide.dbg&&D.send('GetSIStack',{})}),
updTitle:function(){ //change listener for D.prf.title
var ide=this,ri=D.remoteIdentification||{},v=D.versionInfo
document.title=D.prf.title().replace(/\{\w+\}/g,function(x){var X=x.toUpperCase();return(
Expand Down
1 change: 1 addition & 0 deletions src/se.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ D.Se.prototype={
}
}
se.ide.exec(es,trace);se.dirty={};se.histAdd(es.filter(function(x){return!/^\s*$/.test(x)}));se.cm.clearHistory()
se.ide.getThreads();
},
ED:function(cm){
var c=cm.getCursor(),txt=cm.getLine(c.line);
Expand Down

0 comments on commit 0905ec7

Please sign in to comment.