Added shell buffer support for PDB
This commit is contained in:
parent
28c44ce69a
commit
2d1c16a588
@ -8,6 +8,9 @@ function! vebugger#pdb#start(entryFile,args)
|
|||||||
\'willPrintNext':{'expression':'','stage':0}
|
\'willPrintNext':{'expression':'','stage':0}
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
call vebugger#std#openShellBuffer(l:debugger)
|
||||||
|
|
||||||
|
call l:debugger.addReadHandler(function('s:readProgramOutput'))
|
||||||
call l:debugger.addReadHandler(function('s:readWhere'))
|
call l:debugger.addReadHandler(function('s:readWhere'))
|
||||||
call l:debugger.addReadHandler(function('s:readFinish'))
|
call l:debugger.addReadHandler(function('s:readFinish'))
|
||||||
call l:debugger.addReadHandler(function('s:readEvaluatedExpressions'))
|
call l:debugger.addReadHandler(function('s:readEvaluatedExpressions'))
|
||||||
@ -25,6 +28,24 @@ function! vebugger#pdb#start(entryFile,args)
|
|||||||
return l:debugger
|
return l:debugger
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:readProgramOutput(pipeName,line,readResult,debugger) dict
|
||||||
|
if 'out'==a:pipeName
|
||||||
|
if a:line=~'\v^\>'
|
||||||
|
\||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! s:readWhere(pipeName,line,readResult,debugger)
|
function! s:readWhere(pipeName,line,readResult,debugger)
|
||||||
if 'out'==a:pipeName
|
if 'out'==a:pipeName
|
||||||
let l:matches=matchlist(a:line,'\v^\> (.+)\((\d+)\).*\(\)$')
|
let l:matches=matchlist(a:line,'\v^\> (.+)\((\d+)\).*\(\)$')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user