function! vebugger#jdb#start(entryClass,args) let l:debugger=vebugger#std#startDebugger('jdb'.( \has_key(a:args,'classpath') \? ' -classpath '.fnameescape(a:args.classpath) \: '')) let l:debugger.state.jdb={} if has_key(a:args,'srcpath') let l:debugger.state.jdb.srcpath=a:args.srcpath else let l:debugger.state.jdb.srcpath='.' endif let l:debugger.state.jdb.filesToClassesMap={} call l:debugger.writeLine('stop on '.a:entryClass.'.main') call l:debugger.writeLine('run '.a:entryClass) call l:debugger.writeLine('monitor where') call l:debugger.addReadHandler(function('s:readWhere')) call l:debugger.addReadHandler(function('s:readEvaluatedExpressions')) 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.generateWriteActionsFromTemplate() call l:debugger.std_addAllBreakpointActions(g:vebugger_breakpoints) return l:debugger endfunction function! s:findFolderFromStackTrace(src,nameFromStackTrace) let l:path=a:src for l:dirname in split(a:nameFromStackTrace,'\.') let l:nextPath=l:path.'/'.fnameescape(l:dirname) if empty(glob(l:nextPath)) return l:path endif let l:path=l:nextPath endfor return l:path endfunction function! s:readWhere(pipeName,line,readResult,debugger) if 'out'==a:pipeName let l:matches=matchlist(a:line,'\v\s*\[(\d+)]\s*(\S+)\s*\(([^:]*):(\d*)\)') if 4