diff --git a/autoload/vebugger/jdb.vim b/autoload/vebugger/jdb.vim index 9392a89..c842225 100644 --- a/autoload/vebugger/jdb.vim +++ b/autoload/vebugger/jdb.vim @@ -19,6 +19,7 @@ function! vebugger#jdb#start(entryClass,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.generateWriteActionsFromTemplate() @@ -117,6 +118,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') + "Use eval to run the statement - it works! + call a:debugger.writeLine('eval '.l:evalAction.statement) + endif + endfor +endfunction + function! s:readEvaluatedExpressions(pipeName,line,readResult,debugger) if 'out'==a:pipeName let l:matches=matchlist(a:line,'\v^%(\s*%(%(%(\w|\.)+)\[\d+\] )+)? ([^=]+) \= (.*)$')