function! vebugger#pdb#start(entryFile,args) let l:debuggerExe=vebugger#util#getToolFullPath('python',get(a:args,'version'),{ \' ':'python', \'2':'python2', \'3':'python3'}) let l:debugger=vebugger#std#startDebugger(shellescape(l:debuggerExe) \.' -m pdb '.a:entryFile.' '.vebugger#util#commandLineArgsForProgram(a:args)) let l:debugger.state.pdb={} if !has('win32') call vebugger#std#openShellBuffer(l:debugger) endif call l:debugger.addReadHandler(function('vebugger#pdb#_readProgramOutput')) call l:debugger.addReadHandler(function('vebugger#pdb#_readWhere')) call l:debugger.addReadHandler(function('vebugger#pdb#_readFinish')) call l:debugger.addReadHandler(function('vebugger#pdb#_readEvaluatedExpressions')) call l:debugger.setWriteHandler('std','flow',function('vebugger#pdb#_writeFlow')) call l:debugger.setWriteHandler('std','breakpoints',function('vebugger#pdb#_writeBreakpoints')) call l:debugger.setWriteHandler('std','closeDebugger',function('vebugger#pdb#_closeDebugger')) call l:debugger.setWriteHandler('std','evaluateExpressions',function('vebugger#pdb#_requestEvaluateExpression')) call l:debugger.setWriteHandler('std','executeStatements',function('vebugger#pdb#_executeStatements')) call l:debugger.setWriteHandler('std','removeAfterDisplayed',function('vebugger#pdb#_removeAfterDisplayed')) call l:debugger.generateWriteActionsFromTemplate() call l:debugger.std_addAllBreakpointActions(g:vebugger_breakpoints) return l:debugger endfunction function! vebugger#pdb#_readProgramOutput(pipeName,line,readResult,debugger) dict if 'out'==a:pipeName if a:line=~"\\V\[C" " After executing commands this seems to get appended... let self.programOutputMode=1 return endif if a:line=~'\v^\>' \||a:line=~'\V\^(Pdb)' "We don't want to print this particular line... \||a:line=='--Return--' \||a:line=='The program finished and will be restarted' let self.programOutputMode=0 endif if get(self,'programOutputMode') let a:readResult.std.programOutput={'line':a:line} endif if a:line=~'\v^\(Pdb\) (n|s|r|cont)' let self.programOutputMode=1 endif else let a:readResult.std.programOutput={'line':a:line} endif endfunction function! vebugger#pdb#_readWhere(pipeName,line,readResult,debugger) if 'out'==a:pipeName let l:matches=matchlist(a:line,'\v^\> (.+)\((\d+)\).*\(\)%(-\>.*)?$') if 2