Added statement execution for rdebug

This commit is contained in:
IdanArye 2014-05-17 19:50:07 +03:00
parent b2b0550c46
commit f53abcf723

View File

@ -15,6 +15,7 @@ function! vebugger#rdebug#start(entryFile,args)
call l:debugger.setWriteHandler('std','flow',function('s:writeFlow'))
call l:debugger.setWriteHandler('std','breakpoints',function('s:writeBreakpoints'))
call l:debugger.setWriteHandler('std','evaluateExpressions',function('s:requestEvaluateExpression'))
call l:debugger.setWriteHandler('std','executeStatements',function('s:executeStatements'))
call l:debugger.setWriteHandler('std','removeAfterDisplayed',function('s:removeAfterDisplayed'))
call l:debugger.generateWriteActionsFromTemplate()
@ -74,6 +75,15 @@ function! s:requestEvaluateExpression(writeAction,debugger)
endfor
endfunction
function! s:executeStatements(writeAction,debugger)
for l:evalAction in a:writeAction
if has_key(l:evalAction,'statement')
"rdebug uses Ruby functions for commands
call a:debugger.writeLine(l:evalAction.statement)
endif
endfor
endfunction
function! s:readEvaluatedExpressions(pipeName,line,readResult,debugger)
if 'out'==a:pipeName
let l:matches=matchlist(a:line,'\v^(\d+)\: (.*) \= (.*)$')